diff --git a/contrib/charts/cert-manager/templates/deployment.yaml b/contrib/charts/cert-manager/templates/deployment.yaml index f4d10d598..97030e432 100644 --- a/contrib/charts/cert-manager/templates/deployment.yaml +++ b/contrib/charts/cert-manager/templates/deployment.yaml @@ -20,10 +20,16 @@ spec: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.extraArgs }} args: + - --cluster-resource-namespace=$(POD_NAMESPACE) + {{- if .Values.extraArgs }} {{ toYaml .Values.extraArgs | indent 12 }} {{- end }} + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: {{ toYaml .Values.resources | indent 12 }} {{- if .Values.ingressShim.enabled }} diff --git a/docs/deploy/rbac/deployment.yaml b/docs/deploy/rbac/deployment.yaml index 1748dd55d..c6195335a 100644 --- a/docs/deploy/rbac/deployment.yaml +++ b/docs/deploy/rbac/deployment.yaml @@ -22,6 +22,13 @@ spec: - name: cert-manager image: "quay.io/jetstack/cert-manager-controller:v0.2.3" imagePullPolicy: IfNotPresent + args: + - --cluster-resource-namespace=$(POD_NAMESPACE) + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: requests: cpu: 10m diff --git a/docs/deploy/without-rbac/deployment.yaml b/docs/deploy/without-rbac/deployment.yaml index bc15442dd..1ee62ca7f 100644 --- a/docs/deploy/without-rbac/deployment.yaml +++ b/docs/deploy/without-rbac/deployment.yaml @@ -22,6 +22,13 @@ spec: - name: cert-manager image: "quay.io/jetstack/cert-manager-controller:v0.2.3" imagePullPolicy: IfNotPresent + args: + - --cluster-resource-namespace=$(POD_NAMESPACE) + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: requests: cpu: 10m