Skip to content

Commit

Permalink
feat: local
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickleet committed Oct 31, 2022
1 parent e09a89f commit be0033d
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions helm/templates/commands-broker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions helm/templates/events-broker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
backoffDelay: PT1S
{{- end }}
2 changes: 1 addition & 1 deletion helm/templates/integration-tests-role.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.knative.eventing.local }}
{{- if .Values.local }}
{{- else }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/integration-tests-rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.knative.eventing.local }}
{{- if .Values.local }}
{{- else }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/integration-tests-sa.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.knative.eventing.local }}
{{- if .Values.local }}
{{- else }}
apiVersion: v1
kind: ServiceAccount
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/integration-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.knative.eventing.local }}
{{- if .Values.local }}
{{- else }}
{{- if .Values.runIntegrationTests }}
apiVersion: batch/v1
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/ksvc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.knative.eventing.local }}
{{- if .Values.local }}
{{- else }}
apiVersion: serving.knative.dev/v1
kind: Service
Expand Down
8 changes: 4 additions & 4 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit be0033d

Please sign in to comment.