-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Md Soharab Ansari <[email protected]>
- Loading branch information
1 parent
c9b3bfa
commit e3f6c3b
Showing
12 changed files
with
271 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
charts/fission-all/templates/mqt-fission-kafka/deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
{{- if .Values.kafka.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: mqtrigger-kafka | ||
labels: | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
svc: mqtrigger | ||
messagequeue: kafka | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
svc: mqtrigger | ||
messagequeue: kafka | ||
template: | ||
metadata: | ||
labels: | ||
svc: mqtrigger | ||
messagequeue: kafka | ||
annotations: | ||
prometheus.io/scrape: "true" | ||
prometheus.io/path: "/metrics" | ||
prometheus.io/port: "8080" | ||
spec: | ||
containers: | ||
- name: mqtrigger | ||
image: {{ include "fission-bundleImage" . | quote }} | ||
imagePullPolicy: {{ .Values.pullPolicy }} | ||
command: ["/fission-bundle"] | ||
args: ["--mqt", "--routerUrl", "http://router.{{ .Release.Namespace }}"] | ||
ports: | ||
- containerPort: 8080 | ||
name: metrics | ||
env: | ||
- name: MESSAGE_QUEUE_TYPE | ||
value: kafka | ||
- name: MESSAGE_QUEUE_URL | ||
value: "{{.Values.kafka.brokers}}" | ||
- name: MESSAGE_QUEUE_KAFKA_VERSION | ||
value: "{{.Values.kafka.version}}" | ||
- name: DEBUG_ENV | ||
value: {{ .Values.debugEnv | quote }} | ||
- name: PPROF_ENABLED | ||
value: {{ .Values.pprof.enabled | quote }} | ||
{{- include "fission-resource-namespace.envs" . | indent 8 }} | ||
{{- include "opentelemtry.envs" . | indent 8 }} | ||
# TLS authentication is TLS with authentication (2 way) | ||
# More info: https://docs.confluent.io/current/kafka/authentication_ssl.html#ssl-overview | ||
{{- if .Values.kafka.authentication.tls.enabled }} | ||
- name: TLS_ENABLED | ||
value: "true" | ||
- name: MESSAGE_QUEUE_SECRETS | ||
value: /etc/fission/secrets | ||
- name: INSECURE_SKIP_VERIFY | ||
value: "{{ .Values.kafka.authentication.tls.insecureSkipVerify }}" | ||
volumeMounts: | ||
- name: kafka-secrets | ||
mountPath: /etc/fission/secrets | ||
{{- end }} | ||
{{- if .Values.terminationMessagePath }} | ||
terminationMessagePath: {{ .Values.terminationMessagePath }} | ||
{{- end }} | ||
{{- if .Values.terminationMessagePolicy }} | ||
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }} | ||
{{- end }} | ||
serviceAccountName: fission-kafka | ||
{{- if .Values.kafka.authentication.tls.enabled }} | ||
volumes: | ||
- name: kafka-secrets | ||
secret: | ||
secretName: mqtrigger-kafka-secrets | ||
{{- end }} | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
|
||
|
||
--- | ||
{{- if .Values.kafka.authentication.tls.enabled }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: mqtrigger-kafka-secrets | ||
labels: | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
data: | ||
{{- if .Files.Get (printf "%s" .Values.kafka.authentication.tls.caCert) }} | ||
caCert: {{ .Files.Get (printf "%s" .Values.kafka.authentication.tls.caCert) | b64enc }} | ||
{{- else }} | ||
{{ fail "Invalid chart. CA Certificate not found." }} | ||
{{- end }} | ||
{{- if .Files.Get (printf "%s" .Values.kafka.authentication.tls.userCert) }} | ||
userCert: {{ .Files.Get (printf "%s" .Values.kafka.authentication.tls.userCert) | b64enc }} | ||
{{- else }} | ||
{{ fail "Invalid chart. User Certificate not found." }} | ||
{{- end }} | ||
{{- if .Files.Get (printf "%s" .Values.kafka.authentication.tls.userKey) }} | ||
userKey: {{ .Files.Get (printf "%s" .Values.kafka.authentication.tls.userKey) | b64enc }} | ||
{{- else }} | ||
{{ fail "Invalid chart. User Key not found." }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.extraCoreComponentPodConfig }} | ||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}} | ||
{{- end }} | ||
{{- end }} |
23 changes: 23 additions & 0 deletions
23
charts/fission-all/templates/mqt-fission-kafka/podmonitor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{{- if .Values.podMonitor.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PodMonitor | ||
metadata: | ||
name: mqt-fission-kafka-monitor | ||
{{- if .Values.podMonitor.namespace }} | ||
namespace: {{ .Values.podMonitor.namespace }} | ||
{{- end }} | ||
{{- with .Values.podMonitor.additionalPodMonitorLabels }} | ||
labels: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
namespaceSelector: | ||
matchNames: | ||
- {{ .Release.Namespace }} | ||
selector: | ||
matchLabels: | ||
svc: mqtrigger | ||
podMetricsEndpoints: | ||
- port: "metrics" | ||
path: "/metrics" | ||
{{- end -}} |
7 changes: 7 additions & 0 deletions
7
charts/fission-all/templates/mqt-fission-kafka/role-fission-cr.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{- include "fission-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "kafka") .) }} | ||
|
||
{{- if gt (len .Values.additionalFissionNamespaces) 0 }} | ||
{{- range $namespace := $.Values.additionalFissionNamespaces }} | ||
{{ include "fission-role-generator" (merge (dict "namespace" $namespace "component" "kafka") $) }} | ||
{{- end }} | ||
{{- end }} |
7 changes: 7 additions & 0 deletions
7
charts/fission-all/templates/mqt-fission-kafka/role-kubernetes.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{- include "kubernetes-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "kafka") .) }} | ||
|
||
{{- if gt (len .Values.additionalFissionNamespaces) 0 }} | ||
{{- range $namespace := $.Values.additionalFissionNamespaces }} | ||
{{ include "kubernetes-role-generator" (merge (dict "namespace" $namespace "component" "kafka") $) }} | ||
{{- end }} | ||
{{- end }} |
5 changes: 5 additions & 0 deletions
5
charts/fission-all/templates/mqt-fission-kafka/serviceaccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: fission-kafka | ||
namespace: {{ .Release.Namespace }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters