diff --git a/Makefile b/Makefile index 52bf7a1..6dc9f1e 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ deploy-to-local-cluster: kubectl ctx $(LOCAL_DEV_CLUSTER) helm template ./charts/$(SERVICE_NAME)/ \ -f ./charts/$(SERVICE_NAME)/values.yaml \ - --set image.repository=dev.local/$(SERVICE_NAME),image.tag=$(NOW),knative.eventing.local=true,knative.eventing.subscriber=http://host.docker.internal:5002,knative.eventing.dlqSubscriber=http://host.docker.internal:3999 \ + --set image.repository=dev.local/$(SERVICE_NAME),image.tag=$(NOW),local=true \ | kubectl apply -f - delete-local-deployment: diff --git a/helm/templates/commands-broker.yaml b/helm/templates/commands-broker.yaml index 77a4e3c..b2e47a2 100644 --- a/helm/templates/commands-broker.yaml +++ b/helm/templates/commands-broker.yaml @@ -8,8 +8,8 @@ metadata: spec: delivery: deadLetterSink: -{{- if .Values.knative.eventing.local }} - uri: {{ .Values.knative.eventing.dlqSubscriber }}/cloudevent/dead-letter +{{- if .Values.local }} + uri: {{ .Values.localKnativeDlqSubscriber }}/cloudevent/dead-letter {{- else }} ref: apiVersion: serving.knative.dev/v1 diff --git a/helm/templates/events-broker.yaml b/helm/templates/events-broker.yaml index 248c960..4dccd54 100644 --- a/helm/templates/events-broker.yaml +++ b/helm/templates/events-broker.yaml @@ -8,15 +8,15 @@ metadata: spec: delivery: deadLetterSink: -{{- if .Values.knative.eventing.local }} - uri: {{ .Values.knative.eventing.dlqSubscriber }}/cloudevent/dead-letter +{{- if .Values.local }} + uri: {{ .Values.localKnativeDlqSubscriber }}/cloudevent/dead-letter {{- else }} ref: apiVersion: serving.knative.dev/v1 kind: Service name: example-dlq-service uri: /cloudevent/dead-letter -{{- end }} retry: 5 backoffPolicy: exponential - backoffDelay: PT1S \ No newline at end of file + backoffDelay: PT1S +{{- end }} \ No newline at end of file diff --git a/helm/templates/integration-tests-role.yaml b/helm/templates/integration-tests-role.yaml index 5e5d111..2c7a267 100644 --- a/helm/templates/integration-tests-role.yaml +++ b/helm/templates/integration-tests-role.yaml @@ -1,4 +1,4 @@ -{{- if .Values.knative.eventing.local }} +{{- if .Values.local }} {{- else }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role diff --git a/helm/templates/integration-tests-rolebinding.yaml b/helm/templates/integration-tests-rolebinding.yaml index d5cee3d..8c880ae 100644 --- a/helm/templates/integration-tests-rolebinding.yaml +++ b/helm/templates/integration-tests-rolebinding.yaml @@ -1,4 +1,4 @@ -{{- if .Values.knative.eventing.local }} +{{- if .Values.local }} {{- else }} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding diff --git a/helm/templates/integration-tests-sa.yaml b/helm/templates/integration-tests-sa.yaml index 1013785..56e1d0b 100644 --- a/helm/templates/integration-tests-sa.yaml +++ b/helm/templates/integration-tests-sa.yaml @@ -1,4 +1,4 @@ -{{- if .Values.knative.eventing.local }} +{{- if .Values.local }} {{- else }} apiVersion: v1 kind: ServiceAccount diff --git a/helm/templates/integration-tests.yaml b/helm/templates/integration-tests.yaml index c0003b1..0ad7f34 100644 --- a/helm/templates/integration-tests.yaml +++ b/helm/templates/integration-tests.yaml @@ -1,4 +1,4 @@ -{{- if .Values.knative.eventing.local }} +{{- if .Values.local }} {{- else }} {{- if .Values.runIntegrationTests }} apiVersion: batch/v1 diff --git a/helm/templates/ksvc.yaml b/helm/templates/ksvc.yaml index 0bdfa05..58e14c4 100755 --- a/helm/templates/ksvc.yaml +++ b/helm/templates/ksvc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.knative.eventing.local }} +{{- if .Values.local }} {{- else }} apiVersion: serving.knative.dev/v1 kind: Service diff --git a/helm/values.yaml b/helm/values.yaml index 9204b7e..3e742f0 100755 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -24,10 +24,10 @@ knative: minScale: 1 maxScale: 1 concurrencyTarget: 100 - eventing: - local: - subscriber: - dlqSubscriber: + +local: false +localKnativeSubscriber: http://host.docker.internal:5002 +localKnativeDlqSubscriber: http://host.docker.internal:3999 # HorizontalPodAutoscaler hpa: