diff --git a/sl-namespace-init/Chart.yaml b/sl-namespace-init/Chart.yaml index 6cff228..19da4de 100644 --- a/sl-namespace-init/Chart.yaml +++ b/sl-namespace-init/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 name: sl-namespace-init description: Helm chart to auto namespace init -version: 0.3.0 +version: 0.4.0 appVersion: 0.1.0 \ No newline at end of file diff --git a/sl-namespace-init/templates/eventbus.yaml b/sl-namespace-init/templates/eventbus.yaml index 83baf79..dea6d06 100644 --- a/sl-namespace-init/templates/eventbus.yaml +++ b/sl-namespace-init/templates/eventbus.yaml @@ -1,7 +1,8 @@ +{{- if .Values.eventBus }} apiVersion: argoproj.io/v1alpha1 kind: EventBus metadata: - name: default + name: {{ .Values.eventBus | default "default" }} spec: jetstream: auth: token @@ -11,3 +12,4 @@ spec: maxAge: 24h settings: | max_file_store: 1GB +{{- end }} diff --git a/sl-namespace-init/templates/eventsource.yaml b/sl-namespace-init/templates/eventsource.yaml index 7ebd664..57b7b91 100644 --- a/sl-namespace-init/templates/eventsource.yaml +++ b/sl-namespace-init/templates/eventsource.yaml @@ -5,6 +5,7 @@ metadata: spec: template: serviceAccountName: kube-argo + eventBusName: {{ .Values.eventBus | default "default" }} resource: ns-event: group: "" diff --git a/sl-namespace-init/templates/sensor.yaml b/sl-namespace-init/templates/sensor.yaml index f7c51ae..fba22f8 100644 --- a/sl-namespace-init/templates/sensor.yaml +++ b/sl-namespace-init/templates/sensor.yaml @@ -9,6 +9,7 @@ spec: - name: ns eventSourceName: ns-event eventName: ns-event + eventBusName: {{ .Values.eventBus | default "default" }} triggers: - template: name: ns-workflow @@ -55,6 +56,11 @@ spec: container: image: 332947256684.dkr.ecr.ap-southeast-1.amazonaws.com/kube-argo:0.1.0 command: [bash, -c] + resources: + requests: + memory: "256Mi" + limits: + memory: "512Mi" args: - | ns=$(echo '{{"{{"}}inputs.parameters.message{{"}}"}}' | jq -r '."metadata"."labels"."kubernetes.io/metadata.name"') diff --git a/sl-namespace-init/values.yaml b/sl-namespace-init/values.yaml index be82450..e32626e 100644 --- a/sl-namespace-init/values.yaml +++ b/sl-namespace-init/values.yaml @@ -1,11 +1,11 @@ cluster_name: "" -slack_noti_channel: "" - slack_url: "" namespace: "" argo_slack_url: "" -argo_url: "" \ No newline at end of file +argo_url: "" + +eventBus: "" \ No newline at end of file