Skip to content

Commit

Permalink
chore: Align deployment yaml
Browse files Browse the repository at this point in the history
Align the operator deployment yamls between
the Helm template and the kubebuilder generated
yaml in `config/manager/manager.yaml`.

Signed-off-by: Fred Rolland <frolland@nvidia.com>
  • Loading branch information
rollandf committed Oct 17, 2023
1 parent 0d2367d commit 7116e6b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 11 deletions.
14 changes: 10 additions & 4 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ spec:
image: controller:latest
name: manager
env:
- name: STATE_MANIFEST_BASE_DIR
value: "/manifests"
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: ENABLE_WEBHOOKS
value: "false"
securityContext:
Expand All @@ -78,10 +84,10 @@ spec:
periodSeconds: 10
resources:
limits:
cpu: 300m
memory: 100Mi
cpu: 500m
memory: 128Mi
requests:
cpu: 200m
memory: 50Mi
cpu: 5m
memory: 64Mi
serviceAccountName: controller-manager
terminationGracePeriodSeconds: 10
32 changes: 25 additions & 7 deletions deployment/network-operator/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ spec:
replicas: 1
selector:
matchLabels:
control-plane: {{ .Release.Name }}-controller
{{- include "network-operator.selectorLabels" . | nindent 6 }}
template:
metadata:
Expand Down Expand Up @@ -65,15 +66,11 @@ spec:
{{- end }}
command:
- /manager
args:
- --leader-elect
env:
- name: STATE_MANIFEST_BASE_DIR
value: "/manifests"
- name: WATCH_NAMESPACE
value: ""
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
Expand All @@ -82,10 +79,31 @@ spec:
value: "network-operator"
- name: ENABLE_WEBHOOKS
value: "{{ .Values.operator.admissionController.enabled }}"
{{- if .Values.operator.admissionController.enabled }}
securityContext:
allowPrivilegeEscalation: false
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
securityContext:
runAsUser: 65532
terminationGracePeriodSeconds: 10
{{- if .Values.operator.admissionController.enabled }}
volumes:
- name: cert
secret:
Expand Down

0 comments on commit 7116e6b

Please sign in to comment.