Skip to content

Commit

Permalink
revert: Revert "feat: Add extraEnv support to deployments (#2330)" (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sozercan authored Oct 25, 2022
1 parent e84475c commit 1ead7a8
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 75 deletions.
130 changes: 63 additions & 67 deletions cmd/build/helmify/kustomize-for-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ spec:
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
HELMSUBST_AUDIT_CONTROLLER_MANAGER_DEPLOYMENT_IMAGE_RELEASE: ""
ports:
- containerPort: HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_PORT
name: webhook-server
protocol: TCP
- containerPort: HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_METRICS_PORT
name: metrics
protocol: TCP
- containerPort: HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_HEALTH_PORT
name: healthz
protocol: TCP
- containerPort: HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_PORT
name: webhook-server
protocol: TCP
- containerPort: HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_METRICS_PORT
name: metrics
protocol: TCP
- containerPort: HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_HEALTH_PORT
name: healthz
protocol: TCP
readinessProbe:
httpGet:
path: /readyz
Expand All @@ -130,8 +130,6 @@ spec:
HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_TOLERATIONS: ""
imagePullSecrets:
HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_IMAGE_PULL_SECRETS: ""
env:
HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_EXTRAENV: ""
hostNetwork: HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_HOST_NETWORK
dnsPolicy: HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_DNS_POLICY
---
Expand Down Expand Up @@ -169,12 +167,12 @@ spec:
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
HELMSUBST_AUDIT_CONTROLLER_MANAGER_DEPLOYMENT_IMAGE_RELEASE: ""
ports:
- containerPort: HELMSUBST_DEPLOYMENT_AUDIT_METRICS_PORT
name: metrics
protocol: TCP
- containerPort: HELMSUBST_DEPLOYMENT_AUDIT_HEALTH_PORT
name: healthz
protocol: TCP
- containerPort: HELMSUBST_DEPLOYMENT_AUDIT_METRICS_PORT
name: metrics
protocol: TCP
- containerPort: HELMSUBST_DEPLOYMENT_AUDIT_HEALTH_PORT
name: healthz
protocol: TCP
readinessProbe:
httpGet:
path: /readyz
Expand All @@ -199,8 +197,6 @@ spec:
HELMSUBST_DEPLOYMENT_AUDIT_TOLERATIONS: ""
imagePullSecrets:
HELMSUBST_DEPLOYMENT_AUDIT_IMAGE_PULL_SECRETS: ""
env:
HELMSUBST_DEPLOYMENT_AUDIT_EXTRAENV: ""
hostNetwork: HELMSUBST_DEPLOYMENT_AUDIT_HOST_NETWORK
dnsPolicy: HELMSUBST_DEPLOYMENT_AUDIT_DNS_POLICY
---
Expand All @@ -219,25 +215,25 @@ metadata:
name: gatekeeper-mutating-webhook-configuration
annotations: HELMSUBST_MUTATING_WEBHOOK_ANNOTATIONS
webhooks:
- clientConfig:
service:
name: gatekeeper-webhook-service
namespace: gatekeeper-system
path: /v1/mutate
failurePolicy: HELMSUBST_MUTATING_WEBHOOK_FAILURE_POLICY
reinvocationPolicy: HELMSUBST_MUTATING_WEBHOOK_REINVOCATION_POLICY
rules:
- HELMSUBST_MUTATING_WEBHOOK_OPERATION_RULES
matchPolicy: Exact
name: mutation.gatekeeper.sh
namespaceSelector:
matchExpressions:
- key: admission.gatekeeper.sh/ignore
operator: DoesNotExist
- HELMSUBST_MUTATING_WEBHOOK_EXEMPT_NAMESPACE_LABELS
objectSelector: HELMSUBST_MUTATING_WEBHOOK_OBJECT_SELECTOR
sideEffects: None
timeoutSeconds: HELMSUBST_MUTATING_WEBHOOK_TIMEOUT
- clientConfig:
service:
name: gatekeeper-webhook-service
namespace: gatekeeper-system
path: /v1/mutate
failurePolicy: HELMSUBST_MUTATING_WEBHOOK_FAILURE_POLICY
reinvocationPolicy: HELMSUBST_MUTATING_WEBHOOK_REINVOCATION_POLICY
rules:
- HELMSUBST_MUTATING_WEBHOOK_OPERATION_RULES
matchPolicy: Exact
name: mutation.gatekeeper.sh
namespaceSelector:
matchExpressions:
- key: admission.gatekeeper.sh/ignore
operator: DoesNotExist
- HELMSUBST_MUTATING_WEBHOOK_EXEMPT_NAMESPACE_LABELS
objectSelector: HELMSUBST_MUTATING_WEBHOOK_OBJECT_SELECTOR
sideEffects: None
timeoutSeconds: HELMSUBST_MUTATING_WEBHOOK_TIMEOUT
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
Expand All @@ -247,30 +243,30 @@ metadata:
name: gatekeeper-validating-webhook-configuration
annotations: HELMSUBST_VALIDATING_WEBHOOK_ANNOTATIONS
webhooks:
- clientConfig:
service:
name: gatekeeper-webhook-service
namespace: gatekeeper-system
path: /v1/admit
name: validation.gatekeeper.sh
namespaceSelector:
matchExpressions:
- key: admission.gatekeeper.sh/ignore
operator: DoesNotExist
- HELMSUBST_VALIDATING_WEBHOOK_EXEMPT_NAMESPACE_LABELS
objectSelector: HELMSUBST_VALIDATING_WEBHOOK_OBJECT_SELECTOR
timeoutSeconds: HELMSUBST_VALIDATING_WEBHOOK_TIMEOUT
failurePolicy: HELMSUBST_VALIDATING_WEBHOOK_FAILURE_POLICY
rules:
- HELMSUBST_VALIDATING_WEBHOOK_OPERATION_RULES
- clientConfig:
service:
name: gatekeeper-webhook-service
namespace: gatekeeper-system
path: /v1/admitlabel
name: check-ignore-label.gatekeeper.sh
timeoutSeconds: HELMSUBST_VALIDATING_WEBHOOK_TIMEOUT
failurePolicy: HELMSUBST_VALIDATING_WEBHOOK_CHECK_IGNORE_FAILURE_POLICY
- clientConfig:
service:
name: gatekeeper-webhook-service
namespace: gatekeeper-system
path: /v1/admit
name: validation.gatekeeper.sh
namespaceSelector:
matchExpressions:
- key: admission.gatekeeper.sh/ignore
operator: DoesNotExist
- HELMSUBST_VALIDATING_WEBHOOK_EXEMPT_NAMESPACE_LABELS
objectSelector: HELMSUBST_VALIDATING_WEBHOOK_OBJECT_SELECTOR
timeoutSeconds: HELMSUBST_VALIDATING_WEBHOOK_TIMEOUT
failurePolicy: HELMSUBST_VALIDATING_WEBHOOK_FAILURE_POLICY
rules:
- HELMSUBST_VALIDATING_WEBHOOK_OPERATION_RULES
- clientConfig:
service:
name: gatekeeper-webhook-service
namespace: gatekeeper-system
path: /v1/admitlabel
name: check-ignore-label.gatekeeper.sh
timeoutSeconds: HELMSUBST_VALIDATING_WEBHOOK_TIMEOUT
failurePolicy: HELMSUBST_VALIDATING_WEBHOOK_CHECK_IGNORE_FAILURE_POLICY
---
apiVersion: policy/v1
kind: PodDisruptionBudget
Expand All @@ -295,8 +291,8 @@ spec:
pods: HELMSUBST_RESOURCEQUOTA_POD_LIMIT
scopeSelector:
matchExpressions:
- operator: In
scopeName: PriorityClass
values:
- HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_PRIORITY_CLASS_NAME
- HELMSUBST_DEPLOYMENT_AUDIT_PRIORITY_CLASS_NAME
- operator: In
scopeName: PriorityClass
values:
- HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_PRIORITY_CLASS_NAME
- HELMSUBST_DEPLOYMENT_AUDIT_PRIORITY_CLASS_NAME
4 changes: 0 additions & 4 deletions cmd/build/helmify/replacements.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ var replacements = map[string]string{

`HELMSUBST_DEPLOYMENT_AUDIT_IMAGE_PULL_SECRETS: ""`: `{{- toYaml .Values.image.pullSecrets | nindent 8 }}`,

`HELMSUBST_DEPLOYMENT_AUDIT_EXTRAENV: ""`: `{{- toYaml .Values.audit.extraEnv | nindent 8 }}`,

"HELMSUBST_DEPLOYMENT_AUDIT_PRIORITY_CLASS_NAME": `{{ .Values.audit.priorityClassName }}`,

`HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_NODE_SELECTOR: ""`: `{{- toYaml .Values.controllerManager.nodeSelector | nindent 8 }}`,
Expand All @@ -69,8 +67,6 @@ var replacements = map[string]string{

`HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_IMAGE_PULL_SECRETS: ""`: `{{- toYaml .Values.image.pullSecrets | nindent 8 }}`,

`HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_EXTRAENV: ""`: `{{- toYaml .Values.controllerManager.extraEnv | nindent 8 }}`,

"HELMSUBST_DEPLOYMENT_CONTROLLER_MANAGER_PRIORITY_CLASS_NAME": `{{ .Values.controllerManager.priorityClassName }}`,

"HELMSUBST_DEPLOYMENT_REPLICAS": `{{ .Values.replicas }}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ spec:
- mountPath: /tmp/audit
name: tmp-volume
dnsPolicy: {{ .Values.audit.dnsPolicy }}
env:
{{- toYaml .Values.audit.extraEnv | nindent 8 }}
hostNetwork: {{ .Values.audit.hostNetwork }}
imagePullSecrets:
{{- toYaml .Values.image.pullSecrets | nindent 8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ spec:
name: cert
readOnly: true
dnsPolicy: {{ .Values.controllerManager.dnsPolicy }}
env:
{{- toYaml .Values.controllerManager.extraEnv | nindent 8 }}
hostNetwork: {{ .Values.controllerManager.hostNetwork }}
imagePullSecrets:
{{- toYaml .Values.image.pullSecrets | nindent 8 }}
Expand Down

0 comments on commit 1ead7a8

Please sign in to comment.