Skip to content

Commit 77067a5

Browse files
committed
use newer version of webhook source service
1 parent 6d0647f commit 77067a5

4 files changed

Lines changed: 46 additions & 87 deletions

File tree

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,22 @@
1-
{{- if and .Values.cloudEventsPlayer.enabled .Values.cloudEventsPlayer.service.create .Values.cloudEventsPlayer.ingress.enabled }}
2-
{{- $name := printf "%s-cloudevents-player" .Release.Name }}
3-
apiVersion: networking.k8s.io/v1
4-
kind: Ingress
1+
{{- if and .Values.cloudEventsPlayer.enabled .Values.cloudEventsPlayer.domainMapping.domain (ne .Values.cloudEventsPlayer.domainMapping.domain "") }}
2+
{{- $name := default (printf "%s-cloudevents-player" .Release.Name) .Values.cloudEventsPlayer.nameOverride }}
3+
apiVersion: serving.knative.dev/v1beta1
4+
kind: DomainMapping
55
metadata:
6-
name: {{ $name }}
6+
name: {{ .Values.cloudEventsPlayer.domainMapping.domain }}
77
namespace: {{ .Release.Namespace }}
88
labels:
99
app.kubernetes.io/name: cloudevents-player
1010
app.kubernetes.io/instance: {{ .Release.Name }}
1111
app.kubernetes.io/managed-by: {{ .Release.Service }}
12-
{{- with .Values.cloudEventsPlayer.ingress.annotations }}
12+
{{- if .Values.serving.install }}
1313
annotations:
14-
{{ toYaml . | nindent 4 }}
15-
{{- end }}
14+
"helm.sh/hook": post-install,post-upgrade
15+
"helm.sh/hook-weight": "10"
16+
{{- end }}
1617
spec:
17-
{{- if .Values.cloudEventsPlayer.ingress.className }}
18-
ingressClassName: {{ .Values.cloudEventsPlayer.ingress.className }}
19-
{{- end }}
20-
{{- with .Values.cloudEventsPlayer.ingress.tls }}
21-
tls:
22-
{{ toYaml . | nindent 4 }}
23-
{{- end }}
24-
rules:
25-
{{- range $host := .Values.cloudEventsPlayer.ingress.hosts }}
26-
- host: {{ $host.host | quote }}
27-
http:
28-
paths:
29-
{{- $paths := $host.paths | default (list (dict "path" "/" "pathType" "Prefix")) }}
30-
{{- range $path := $paths }}
31-
- path: {{ $path.path | quote }}
32-
pathType: {{ $path.pathType }}
33-
backend:
34-
service:
35-
name: {{ $name }}
36-
port:
37-
number: {{ $.Values.cloudEventsPlayer.service.port }}
38-
{{- end }}
39-
{{- end }}
18+
ref:
19+
name: {{ $name }}
20+
kind: Service
21+
apiVersion: serving.knative.dev/v1
4022
{{- end }}

charts/notification-automation/templates/cloudevents-player-trigger.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- if .Values.cloudEventsPlayer.enabled }}
2-
{{- $name := printf "%s-cloudevents-player" .Release.Name }}
2+
{{- $name := default (printf "%s-cloudevents-player" .Release.Name) .Values.cloudEventsPlayer.nameOverride }}
33
{{- if .Values.cloudEventsPlayer.subscribeBroker.enabled }}
44
{{- $brokerRef := .Values.cloudEventsPlayer.subscribeBroker.broker }}
55
{{- $brokerName := $brokerRef.name }}
@@ -25,7 +25,7 @@ spec:
2525
broker: {{ $brokerName }}
2626
subscriber:
2727
ref:
28-
apiVersion: v1
28+
apiVersion: serving.knative.dev/v1
2929
kind: Service
3030
name: {{ $name }}
3131
uri: /
Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- if .Values.cloudEventsPlayer.enabled }}
2-
{{- $name := printf "%s-cloudevents-player" .Release.Name }}
2+
{{- $name := default (printf "%s-cloudevents-player" .Release.Name) .Values.cloudEventsPlayer.nameOverride }}
33
{{- $saName := default $name .Values.cloudEventsPlayer.serviceAccount.name }}
44
{{- $imageRepo := required "cloudEventsPlayer.image.repository is required when cloudEventsPlayer.enabled=true" .Values.cloudEventsPlayer.image.repository }}
55
{{- $imageTag := default "latest" .Values.cloudEventsPlayer.image.tag }}
@@ -16,39 +16,39 @@ metadata:
1616
---
1717
{{- end }}
1818

19-
apiVersion: apps/v1
20-
kind: Deployment
19+
apiVersion: serving.knative.dev/v1
20+
kind: Service
2121
metadata:
2222
name: {{ $name }}
2323
namespace: {{ .Release.Namespace }}
2424
labels:
2525
app.kubernetes.io/name: cloudevents-player
2626
app.kubernetes.io/instance: {{ .Release.Name }}
2727
app.kubernetes.io/managed-by: {{ .Release.Service }}
28+
{{- if not .Values.cloudEventsPlayer.public }}
29+
networking.knative.dev/visibility: cluster-local
30+
{{- end }}
31+
{{- if .Values.serving.install }}
32+
annotations:
33+
"helm.sh/hook": post-install,post-upgrade
34+
"helm.sh/hook-weight": "5"
35+
{{- end }}
2836
spec:
29-
replicas: {{ .Values.cloudEventsPlayer.replicaCount }}
30-
selector:
31-
matchLabels:
32-
app.kubernetes.io/name: cloudevents-player
33-
app.kubernetes.io/instance: {{ .Release.Name }}
3437
template:
3538
metadata:
36-
labels:
37-
app.kubernetes.io/name: cloudevents-player
38-
app.kubernetes.io/instance: {{ .Release.Name }}
39+
annotations:
40+
autoscaling.knative.dev/min-scale: {{ .Values.cloudEventsPlayer.minScale | quote }}
41+
autoscaling.knative.dev/max-scale: {{ .Values.cloudEventsPlayer.maxScale | quote }}
3942
spec:
4043
serviceAccountName: {{ $saName }}
4144
containers:
42-
- name: cloudevents-player
43-
image: {{ $imageRepo }}:{{ $imageTag }}
45+
- image: {{ $imageRepo }}:{{ $imageTag }}
4446
imagePullPolicy: {{ .Values.cloudEventsPlayer.image.pullPolicy }}
4547
ports:
4648
- containerPort: {{ .Values.cloudEventsPlayer.containerPort }}
4749
protocol: TCP
48-
env:
49-
- name: PORT
50-
value: {{ .Values.cloudEventsPlayer.containerPort | quote }}
5150
{{- if .Values.cloudEventsPlayer.extraEnv }}
51+
env:
5252
{{- toYaml .Values.cloudEventsPlayer.extraEnv | nindent 8 }}
5353
{{- end }}
5454
livenessProbe:
@@ -64,26 +64,5 @@ spec:
6464
initialDelaySeconds: 5
6565
periodSeconds: 5
6666
---
67-
{{- if .Values.cloudEventsPlayer.service.create }}
68-
apiVersion: v1
69-
kind: Service
70-
metadata:
71-
name: {{ $name }}
72-
namespace: {{ .Release.Namespace }}
73-
labels:
74-
app.kubernetes.io/name: cloudevents-player
75-
app.kubernetes.io/instance: {{ .Release.Name }}
76-
app.kubernetes.io/managed-by: {{ .Release.Service }}
77-
spec:
78-
selector:
79-
app.kubernetes.io/name: cloudevents-player
80-
app.kubernetes.io/instance: {{ .Release.Name }}
81-
ports:
82-
- port: {{ .Values.cloudEventsPlayer.service.port }}
83-
targetPort: {{ .Values.cloudEventsPlayer.service.targetPort }}
84-
protocol: TCP
85-
type: {{ .Values.cloudEventsPlayer.service.type }}
86-
---
87-
{{- end }}
8867

8968
{{- end }}

charts/notification-automation/values.yaml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ webhookSource:
103103
maxScale: "5"
104104
image:
105105
repository: "ghcr.io/eoepca/na-webhook-source"
106-
tag: "sha-57b7a6e"
106+
tag: "sha-405af37"
107107
pullPolicy: IfNotPresent
108108
containerPort: 8080
109109
serviceAccount:
@@ -171,7 +171,15 @@ apiServerSource:
171171
# CloudEvents Player configuration
172172
cloudEventsPlayer:
173173
enabled: false
174-
replicaCount: 1
174+
# Override the Knative Service name (determines public URL: <name>.<namespace>.<domain>)
175+
# When empty, defaults to "<release>-cloudevents-player"
176+
nameOverride: ""
177+
# When false (default), the ksvc is cluster-local (private).
178+
# Set to true to expose it externally via Knative's ingress gateway.
179+
public: false
180+
# Knative autoscaling
181+
minScale: "1"
182+
maxScale: "1"
175183
image:
176184
repository: "quay.io/ruben/cloudevents-player"
177185
tag: "v1.3"
@@ -180,21 +188,11 @@ cloudEventsPlayer:
180188
serviceAccount:
181189
create: true
182190
name: ""
183-
service:
184-
create: true
185-
type: ClusterIP
186-
port: 80
187-
targetPort: 8080
188-
ingress:
189-
enabled: false
190-
className: ""
191-
annotations: {}
192-
hosts:
193-
- host: cloudevents-player.local
194-
paths:
195-
- path: /
196-
pathType: Prefix
197-
tls: []
191+
# Optional: custom domain mapping for the Knative Service.
192+
# When set, a DomainMapping is created. When empty, the auto-generated
193+
# Knative URL is used: <name>.<namespace>.<serving.domain>
194+
domainMapping:
195+
domain: ""
198196
subscribeBroker:
199197
enabled: true
200198
broker:

0 commit comments

Comments
 (0)