Commit 8d0dbfcc authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Helm chart for kafkamagic deployment

moved kafka magic to ub-digitale-dienste namespace.
parent 292e75b9
......@@ -5,27 +5,42 @@
}
},
"script": {
"params" : {
"institution": [
{
"facet" : [],
"filter" : "csa",
"name" : {
"de" : ["Cinémathèque suisse"],
"fr" : ["Cinémathèque suisse"],
"it" : ["Cinémathèque suisse"], "un" : []}},
{
"facet" : [], "filter" : "bar",
"name" : {
"de" : ["Schweizerisches Bundesarchiv"],
"fr" : ["Archives fédérales suisses"],
"it" : ["Archivio federale svizero"],
"un" : []}
}
]
},
"source" : "ctx._source['institution'] = params.institution"
}}
"params": {
"institution": [
{
"facet": [],
"filter": "csa",
"name": {
"de": [
"Cinémathèque suisse"
],
"fr": [
"Cinémathèque suisse"
],
"it": [
"Cinémathèque suisse"
],
"un": []
}
},
{
"facet": [],
"filter": "bar",
"name": {
"de": [
"Schweizerisches Bundesarchiv"
],
"fr": [
"Archives fédérales suisses"
],
"it": [
"Archivio federale svizzero"
],
"un": []
}
}
]
},
"source": "ctx._source['institution'] = params.institution"
}
}
helm upgrade --install adm-kafkamagic-deployment ./magic
\ No newline at end of file
apiVersion: v2
name: kafkamagic
description: Deployment for kafkamagic to explore the kafka clusters.
type: application
version: 1.0.0
appVersion: latest
maintainers:
- name: Jonas Waeber
email: jonas.waeber@unibas.ch
\ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
name: kafkamagic
namespace: memobase
labels:
app: kafkamagic
spec:
selector:
matchLabels:
app: kafkamagic
replicas: 1
template:
metadata:
labels:
app: kafkamagic
group: devops
spec:
containers:
- name: kafkamagic-container
image: digitsy/kafka-magic:latest
ports:
- containerPort: 80
name: http
protocol: TCP
imagePullPolicy: Always
apiVersion: v1
kind: Service
metadata:
namespace: memobase
name: kafkamagic-service
labels:
app: kafkamagic
spec:
ports:
- port: 8080
targetPort: 80
selector:
app: kafkamagic
group: devops
clusterIP: None
\ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{ .Values.k8sGroup }}-{{ .Values.k8sName }}"
namespace: "{{ .Values.k8sNamespace }}"
labels:
app: "{{ .Values.k8sGroup }}-{{ .Values.k8sName }}"
group: "{{ .Values.k8sGroupName }}"
spec:
selector:
matchLabels:
app: "{{ .Values.k8sGroup }}-{{ .Values.k8sName }}"
group: "{{ .Values.k8sGroupName }}"
replicas: {{ .Values.k8sReplicas }}
template:
metadata:
labels:
app: "{{ .Values.k8sGroup }}-{{ .Values.k8sName }}"
group: "{{ .Values.k8sGroupName }}"
spec:
containers:
- name: "{{ .Values.k8sGroup }}-{{ .Values.k8sName }}-container"
image: "{{ .Values.image }}:{{ .Values.tag }}"
ports:
- containerPort: {{ .Values.internalPort }}
name: http
protocol: TCP
imagePullPolicy: Always
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
namespace: memobase
name: kafkamagic-ingress
namespace: "{{ .Values.k8sNamespace }}"
name: "{{ .Values.k8sGroup }}-{{ .Values.k8sName }}-ingress"
labels:
app: "{{ .Values.k8sGroup }}-{{ .Values.k8sName }}"
group: "{{ .Values.k8sGroupName }}"
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/whitelist-source-range: "131.152.0.0/16"
nginx.ingress.kubernetes.io/whitelist-source-range: "{{ .Values.whitelistIPRange }}"
spec:
tls:
- hosts:
- kafka.memobase.k8s.unibas.ch
secretName: kafka.memobase.k8s.unibas.ch-tls
- "{{ .Values.host }}"
secretName: "{{ .Values.host }}-tls"
rules:
- host: kafka.memobase.k8s.unibas.ch
- host: "{{ .Values.host }}"
http:
paths:
- path: /
backend:
serviceName: kafkamagic-service
servicePort: 8080
\ No newline at end of file
serviceName: "{{ .Values.k8sName }}-service"
servicePort: {{ .Values.servicePort }}
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
namespace: "{{ .Values.k8sNamespace }}"
name: "{{ .Values.k8sGroup }}-{{ .Values.k8sName }}-service"
labels:
app: "{{ .Values.k8sGroup }}-{{ .Values.k8sName }}"
group: "{{ .Values.k8sGroupName }}"
spec:
ports:
- port: {{ .Values.servicePort }}
targetPort: {{ .Values.internalPort }}
selector:
app: "{{ .Values.k8sGroup }}-{{ .Values.k8sName }}"
group: "{{ .Values.k8sGroupName }}"
clusterIP: None
\ No newline at end of file
image: digitsy/kafka-magic
tag: latest
k8sGroup: adm
k8sGroupName: administration
k8sName: kafkamagic
k8sNamespace: ub-digitale-dienste
k8sReplicas: 1
host: kafka.memobase.k8s.unibas.ch
whitelistIPRange: "131.152.0.0/16"
internalPort: 80
servicePort: 8080
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment