Skip to content

Commit

Permalink
feat: replace yaml merge tags (#7662)
Browse files Browse the repository at this point in the history
  • Loading branch information
converge authored Feb 8, 2024
1 parent 5500bed commit 836f4da
Show file tree
Hide file tree
Showing 13 changed files with 900 additions and 66 deletions.
11 changes: 9 additions & 2 deletions config/brokers/mt-channel-broker/deployments/broker-filter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
- name: filter
terminationMessagePolicy: FallbackToLogsOnError
image: ko://knative.dev/eventing/cmd/broker/filter
readinessProbe: &probe
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthz
Expand All @@ -49,7 +49,14 @@ spec:
successThreshold: 1
timeoutSeconds: 1
livenessProbe:
<<: *probe
failureThreshold: 3
httpGet:
path: /healthz
port: 8080
scheme: HTTP
periodSeconds: 2
successThreshold: 1
timeoutSeconds: 1
initialDelaySeconds: 5
resources:
requests:
Expand Down
11 changes: 9 additions & 2 deletions config/brokers/mt-channel-broker/deployments/broker-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
- name: ingress
terminationMessagePolicy: FallbackToLogsOnError
image: ko://knative.dev/eventing/cmd/broker/ingress
readinessProbe: &probe
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthz
Expand All @@ -49,7 +49,14 @@ spec:
successThreshold: 1
timeoutSeconds: 1
livenessProbe:
<<: *probe
failureThreshold: 3
httpGet:
path: /healthz
port: 8080
scheme: HTTP
periodSeconds: 2
successThreshold: 1
timeoutSeconds: 1
initialDelaySeconds: 5
resources:
requests:
Expand Down
19 changes: 14 additions & 5 deletions config/channels/in-memory-channel/deployments/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ metadata:
app.kubernetes.io/name: knative-eventing
spec:
selector:
matchLabels: &labels
matchLabels:
messaging.knative.dev/channel: in-memory-channel
messaging.knative.dev/role: controller
template:
metadata:
labels:
<<: *labels
messaging.knative.dev/channel: in-memory-channel
messaging.knative.dev/role: controller
app.kubernetes.io/component: imc-controller
app.kubernetes.io/version: devel
app.kubernetes.io/name: knative-eventing
Expand All @@ -40,7 +41,9 @@ spec:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels: *labels
matchLabels:
messaging.knative.dev/channel: in-memory-channel
messaging.knative.dev/role: controller
topologyKey: kubernetes.io/hostname
weight: 100
serviceAccountName: imc-controller
Expand Down Expand Up @@ -88,7 +91,7 @@ spec:
- name: https-webhook
containerPort: 8443

readinessProbe: &probe
readinessProbe:
periodSeconds: 1
httpGet:
scheme: HTTPS
Expand All @@ -97,7 +100,13 @@ spec:
- name: k-kubelet-probe
value: "webhook"
livenessProbe:
<<: *probe
periodSeconds: 1
httpGet:
scheme: HTTPS
port: 8443
httpHeaders:
- name: k-kubelet-probe
value: "webhook"
initialDelaySeconds: 120

# Our webhook should gracefully terminate by lame ducking first, set this to a sufficiently
Expand Down
20 changes: 15 additions & 5 deletions config/channels/in-memory-channel/deployments/dispatcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ metadata:
app.kubernetes.io/name: knative-eventing
spec:
selector:
matchLabels: &labels
matchLabels:
messaging.knative.dev/channel: in-memory-channel
messaging.knative.dev/role: dispatcher
template:
metadata:
labels:
<<: *labels
messaging.knative.dev/channel: in-memory-channel
messaging.knative.dev/role: dispatcher
app.kubernetes.io/component: imc-dispatcher
app.kubernetes.io/version: devel
app.kubernetes.io/name: knative-eventing
Expand All @@ -40,15 +41,17 @@ spec:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels: *labels
matchLabels:
messaging.knative.dev/channel: in-memory-channel
messaging.knative.dev/role: dispatcher
topologyKey: kubernetes.io/hostname
weight: 100
serviceAccountName: imc-dispatcher
enableServiceLinks: false
containers:
- name: dispatcher
image: ko://knative.dev/eventing/cmd/in_memory/channel_dispatcher
readinessProbe: &probe
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthz
Expand All @@ -58,7 +61,14 @@ spec:
successThreshold: 1
timeoutSeconds: 1
livenessProbe:
<<: *probe
failureThreshold: 3
httpGet:
path: /healthz
port: 8080
scheme: HTTP
periodSeconds: 2
successThreshold: 1
timeoutSeconds: 1
initialDelaySeconds: 5
env:
- name: CONFIG_LOGGING_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ rules:
resources:
- services
- serviceaccounts
verbs: &everything
verbs:
- get
- list
- watch
Expand All @@ -68,12 +68,26 @@ rules:
- "rbac.authorization.k8s.io"
resources:
- rolebindings
verbs: *everything
verbs:
- get
- list
- watch
- create
- update
- patch

- apiGroups:
- apps
resources:
- deployments
verbs: *everything
verbs:
- get
- list
- watch
- create
- update
- patch

- apiGroups:
- apps
resources:
Expand Down Expand Up @@ -101,15 +115,22 @@ rules:
- coordination.k8s.io
resources:
- leases
verbs: *everything
verbs:
- get
- list
- watch
- create
- update
- patch


# For actually registering our webhook.
- apiGroups:
- "admissionregistration.k8s.io"
resources:
- "mutatingwebhookconfigurations"
- "validatingwebhookconfigurations"
verbs: &everything
verbs:
- "get"
- "list"
- "create"
Expand Down
9 changes: 6 additions & 3 deletions config/core/deployments/pingsource-mt-adapter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ spec:
# when set to 0 (and only 0) will be set to 1 when the first PingSource is created.
replicas: 0
selector:
matchLabels: &labels
matchLabels:
eventing.knative.dev/source: ping-source-controller
sources.knative.dev/role: adapter
template:
metadata:
labels:
<<: *labels
eventing.knative.dev/source: ping-source-controller
sources.knative.dev/role: adapter
app.kubernetes.io/component: pingsource-mt-adapter
app.kubernetes.io/version: devel
app.kubernetes.io/name: knative-eventing
Expand All @@ -41,7 +42,9 @@ spec:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels: *labels
matchLabels:
eventing.knative.dev/source: ping-source-controller
sources.knative.dev/role: adapter
topologyKey: kubernetes.io/hostname
weight: 100
enableServiceLinks: false
Expand Down
15 changes: 11 additions & 4 deletions config/core/deployments/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ metadata:
app.kubernetes.io/name: knative-eventing
spec:
selector:
matchLabels: &labels
matchLabels:
app: eventing-webhook
role: eventing-webhook
template:
metadata:
labels:
<<: *labels
app: eventing-webhook
role: eventing-webhook
app.kubernetes.io/component: eventing-webhook
app.kubernetes.io/version: devel
app.kubernetes.io/name: knative-eventing
Expand Down Expand Up @@ -110,7 +111,7 @@ spec:
- name: profiling
containerPort: 8008

readinessProbe: &probe
readinessProbe:
periodSeconds: 1
httpGet:
scheme: HTTPS
Expand All @@ -119,7 +120,13 @@ spec:
- name: k-kubelet-probe
value: "webhook"
livenessProbe:
<<: *probe
periodSeconds: 1
httpGet:
scheme: HTTPS
port: 8443
httpHeaders:
- name: k-kubelet-probe
value: "webhook"
initialDelaySeconds: 120

# Our webhook should gracefully terminate by lame ducking first, set this to a sufficiently
Expand Down
Loading

0 comments on commit 836f4da

Please sign in to comment.