Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing injection issue #187

Merged
merged 2 commits into from
Sep 28, 2023
Merged

fixing injection issue #187

merged 2 commits into from
Sep 28, 2023

Conversation

abodhekar
Copy link
Contributor

@abodhekar abodhekar commented Sep 27, 2023

There were problems injecting sidecar container.

made two fixes -

  1. added necessary parameters to logger as it does only take arguments in key-val pair. Without such, it fatals
  2. changed service name of dsnexec webhook to same as dbproxy. Because, there was no such service present earlier

@abodhekar abodhekar marked this pull request as ready for review September 27, 2023 10:19
@abodhekar abodhekar requested a review from abalaven September 27, 2023 10:19
@abodhekar abodhekar enabled auto-merge (rebase) September 27, 2023 15:04
return false, "", ""
}

alreadyInjected, err := strconv.ParseBool(pod.Annotations["infoblox.com/dsnexec-injected"])

if err == nil && alreadyInjected {
dsnexecLog.Info("DsnExec sidecar already injected: ", pod.Name, remoteDbSecretName, dsnExecConfigSecret)
dsnexecLog.Info("DsnExec sidecar already injected: ", pod.Name, remoteDbSecretName, pod.Name, dsnExecConfigSecret)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be pod.Name or pod.Annotations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abalaven - done

return false, remoteDbSecretName, dsnExecConfigSecret
}

dsnexecLog.Info("DsnExec sidecar Injection required: ", pod.Name, remoteDbSecretName, dsnExecConfigSecret)
dsnexecLog.Info("DsnExec sidecar Injection required: ", pod.Name, remoteDbSecretName, pod.Name, dsnExecConfigSecret)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abalaven - done

@abodhekar abodhekar requested a review from abalaven September 27, 2023 19:27
@abodhekar abodhekar merged commit afe25c3 into main Sep 28, 2023
2 checks passed
@abodhekar abodhekar deleted the fix/dsnexec-sidecar-injection-issue branch September 28, 2023 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants