Skip to content

PTEUDO-1385 disable dsnexec mutating webhook for lack of tests #277

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

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ webhooks:
- key: "persistance.atlas.infoblox.com/class"
operator: "In"
values:
- {{ .Values.dbController.class | quote }}
- {{ .Values.dbController.class | quote }}
rules:
- apiGroups:
- ""
Expand All @@ -49,6 +49,13 @@ webhooks:
admissionReviewVersions: ["v1"]
failurePolicy: Ignore
name: dsnexec-injector.infoblox.com
objectSelector:
matchExpressions:
# Disable dsn-exec until we reimplement it in #PTEUDO-1385
- key: "donotenablethiswithoutwritingtests"
Operator: "In"
values:
- "mytestsareallpassing"
rules:
- apiGroups:
- ""
Expand Down
3 changes: 2 additions & 1 deletion helm/db-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ dbproxy:
tag: ""

dsnexec:
enabled: true
# Do not enable this without writing complete unit and integration tests using helm
enabled: false
image:
repository: "ghcr.io/infobloxopen/dsnexec"
tag: ""
Expand Down
2 changes: 0 additions & 2 deletions webhook/webhook-dsnexec.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ var (
func dsnExecSideCarInjectionRequired(pod *corev1.Pod) (bool, string, string) {
remoteDbSecretName, ok := pod.Annotations["infoblox.com/remote-db-dsn-secret"]
if !ok {
dsnexecLog.V(1).Info("remote-db-dsn-secret can not be seen in the annotations.", pod.Name, pod.Annotations)
return false, "", ""
}

dsnExecConfigSecret, ok := pod.Annotations["infoblox.com/dsnexec-config-secret"]
if !ok {
dsnexecLog.V(1).Info("dsnexec-config-secret can not be seen in the annotations.", pod.Name, pod.Annotations)
return false, "", ""
}

Expand Down
Loading