fix(argo-events): add namespace field for namespace scoped resources (#1959)
* fix(argo-events): add namespace field for namespace scoped resources Signed-off-by: yu-croco <yu.croco@gmail.com> * Apply suggestion from code review Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> --------- Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
parent
406e07b46b
commit
076cf82ddd
13 changed files with 18 additions and 8 deletions
|
@ -2,7 +2,7 @@ apiVersion: v2
|
||||||
appVersion: v1.7.6
|
appVersion: v1.7.6
|
||||||
description: A Helm chart for Argo Events, the event-driven workflow automation framework
|
description: A Helm chart for Argo Events, the event-driven workflow automation framework
|
||||||
name: argo-events
|
name: argo-events
|
||||||
version: 2.1.6
|
version: 2.2.0
|
||||||
home: https://github.com/argoproj/argo-helm
|
home: https://github.com/argoproj/argo-helm
|
||||||
icon: https://argoproj.github.io/argo-events/assets/logo.png
|
icon: https://argoproj.github.io/argo-events/assets/logo.png
|
||||||
keywords:
|
keywords:
|
||||||
|
@ -16,4 +16,4 @@ maintainers:
|
||||||
annotations:
|
annotations:
|
||||||
artifacthub.io/changes: |
|
artifacthub.io/changes: |
|
||||||
- kind: fixed
|
- kind: fixed
|
||||||
description: fix toYaml function in deployment template for envFrom block
|
description: add namespace field for namespace scoped resources
|
||||||
|
|
|
@ -2,6 +2,7 @@ apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "argo-events.controller.fullname" . }}
|
name: {{ include "argo-events.controller.fullname" . }}
|
||||||
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "argo-events.labels" (dict "context" . "name" .Values.controller.name) | nindent 4 }}
|
{{- include "argo-events.labels" (dict "context" . "name" .Values.controller.name) | nindent 4 }}
|
||||||
data:
|
data:
|
||||||
|
|
|
@ -2,6 +2,7 @@ apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "argo-events.controller.fullname" . }}
|
name: {{ include "argo-events.controller.fullname" . }}
|
||||||
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "argo-events.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
{{- include "argo-events.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||||
app.kubernetes.io/version: {{ include "argo-events.controller_chart_version_label" . }}
|
app.kubernetes.io/version: {{ include "argo-events.controller_chart_version_label" . }}
|
||||||
|
|
|
@ -3,6 +3,7 @@ apiVersion: {{ template "argo-events.pdb.apiVersion" . }}
|
||||||
kind: PodDisruptionBudget
|
kind: PodDisruptionBudget
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "argo-events.controller.fullname" . }}
|
name: {{ template "argo-events.controller.fullname" . }}
|
||||||
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "argo-events.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
{{- include "argo-events.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||||
{{- with .Values.controller.pdb.labels }}
|
{{- with .Values.controller.pdb.labels }}
|
||||||
|
|
|
@ -3,6 +3,9 @@ apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: {{ .Values.controller.rbac.namespaced | ternary "Role" "ClusterRole" }}
|
kind: {{ .Values.controller.rbac.namespaced | ternary "Role" "ClusterRole" }}
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "argo-events.controller.fullname" . }}
|
name: {{ include "argo-events.controller.fullname" . }}
|
||||||
|
{{- if .Values.controller.rbac.namespaced }}
|
||||||
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
|
{{- end }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "argo-events.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
{{- include "argo-events.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||||
rules:
|
rules:
|
||||||
|
@ -119,5 +122,5 @@ roleRef:
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: {{ include "argo-events.controller.serviceAccountName" . }}
|
name: {{ include "argo-events.controller.serviceAccountName" . }}
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -3,6 +3,7 @@ apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "argo-events.controller.fullname" . }}-metrics
|
name: {{ template "argo-events.controller.fullname" . }}-metrics
|
||||||
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
{{- with .Values.controller.metrics.service.annotations }}
|
{{- with .Values.controller.metrics.service.annotations }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- range $key, $value := . }}
|
{{- range $key, $value := . }}
|
||||||
|
|
|
@ -4,6 +4,7 @@ kind: ServiceAccount
|
||||||
automountServiceAccountToken: {{ .Values.controller.serviceAccount.automountServiceAccountToken }}
|
automountServiceAccountToken: {{ .Values.controller.serviceAccount.automountServiceAccountToken }}
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "argo-events.controller.serviceAccountName" . }}
|
name: {{ include "argo-events.controller.serviceAccountName" . }}
|
||||||
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
{{- with .Values.controller.serviceAccount.annotations }}
|
{{- with .Values.controller.serviceAccount.annotations }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- range $key, $value := . }}
|
{{- range $key, $value := . }}
|
||||||
|
|
|
@ -3,9 +3,7 @@ apiVersion: monitoring.coreos.com/v1
|
||||||
kind: ServiceMonitor
|
kind: ServiceMonitor
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "argo-events.controller.fullname" . }}
|
name: {{ template "argo-events.controller.fullname" . }}
|
||||||
{{- with .Values.controller.metrics.serviceMonitor.namespace }}
|
namespace: {{ default .Release.Namespace .Values.controller.metrics.serviceMonitor.namespace | quote }}
|
||||||
namespace: {{ . }}
|
|
||||||
{{- end }}
|
|
||||||
labels:
|
labels:
|
||||||
{{- include "argo-events.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
{{- include "argo-events.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||||
{{- with .Values.controller.metrics.serviceMonitor.selector }}
|
{{- with .Values.controller.metrics.serviceMonitor.selector }}
|
||||||
|
@ -31,7 +29,7 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
namespaceSelector:
|
namespaceSelector:
|
||||||
matchNames:
|
matchNames:
|
||||||
- {{ .Release.Namespace }}
|
- {{ .Release.Namespace | quote }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{- include "argo-events.selectorLabels" (dict "context" . "component" .Values.controller.name "name" (printf "%s-metrics" .Values.controller.name)) | nindent 6 }}
|
{{- include "argo-events.selectorLabels" (dict "context" . "component" .Values.controller.name "name" (printf "%s-metrics" .Values.controller.name)) | nindent 6 }}
|
||||||
|
|
|
@ -12,5 +12,5 @@ roleRef:
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: {{ include "argo-events.webhook.serviceAccountName" . }}
|
name: {{ include "argo-events.webhook.serviceAccountName" . }}
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -3,6 +3,7 @@ apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: events-webhook
|
name: events-webhook
|
||||||
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "argo-events.labels" (dict "context" . "component" .Values.webhook.name "name" .Values.webhook.name) | nindent 4 }}
|
{{- include "argo-events.labels" (dict "context" . "component" .Values.webhook.name "name" .Values.webhook.name) | nindent 4 }}
|
||||||
app.kubernetes.io/version: {{ include "argo-events.webhook_chart_version_label" . }}
|
app.kubernetes.io/version: {{ include "argo-events.webhook_chart_version_label" . }}
|
||||||
|
|
|
@ -3,6 +3,7 @@ apiVersion: {{ template "argo-events.pdb.apiVersion" . }}
|
||||||
kind: PodDisruptionBudget
|
kind: PodDisruptionBudget
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "argo-events.webhook.fullname" . }}
|
name: {{ template "argo-events.webhook.fullname" . }}
|
||||||
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "argo-events.labels" (dict "context" . "component" .Values.webhook.name "name" .Values.webhook.name) | nindent 4 }}
|
{{- include "argo-events.labels" (dict "context" . "component" .Values.webhook.name "name" .Values.webhook.name) | nindent 4 }}
|
||||||
{{- with .Values.webhook.pdb.labels }}
|
{{- with .Values.webhook.pdb.labels }}
|
||||||
|
|
|
@ -3,6 +3,7 @@ apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: events-webhook
|
name: events-webhook
|
||||||
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "argo-events.labels" (dict "context" . "name" .Values.webhook.name) | nindent 4 }}
|
{{- include "argo-events.labels" (dict "context" . "name" .Values.webhook.name) | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
|
|
|
@ -4,6 +4,7 @@ kind: ServiceAccount
|
||||||
automountServiceAccountToken: {{ .Values.webhook.serviceAccount.automountServiceAccountToken }}
|
automountServiceAccountToken: {{ .Values.webhook.serviceAccount.automountServiceAccountToken }}
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "argo-events.webhook.serviceAccountName" . }}
|
name: {{ include "argo-events.webhook.serviceAccountName" . }}
|
||||||
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
{{- with .Values.webhook.serviceAccount.annotations }}
|
{{- with .Values.webhook.serviceAccount.annotations }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- range $key, $value := . }}
|
{{- range $key, $value := . }}
|
||||||
|
|
Loading…
Reference in a new issue