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 baa69f3 commit 5f48b57
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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:5020 \
--set image.repository=dev.local/$(SERVICE_NAME),image.tag=$(NOW),local=true \
| kubectl apply -f -

delete-local-deployment:
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
4 changes: 2 additions & 2 deletions helm/templates/todo.initialized.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ spec:
attributes:
type: todo.initialized
subscriber:
{{- if .Values.knative.eventing.local }}
uri: {{ .Values.knative.eventing.subscriber }}/cloudevent/todo.initialized
{{- if .Values.local }}
uri: {{ .Values.localKnativeSubscriber }}/cloudevent/todo.initialized
{{- else }}
ref:
{{- if .Values.knativeDeploy }}
Expand Down
5 changes: 3 additions & 2 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ resources:
knative:
minScale: 1
maxScale: 3
eventing:
local:

local: false
localKnativeSubscriber: http://host.docker.internal:5020

0 comments on commit 5f48b57

Please sign in to comment.