moved base (#146)

* moved base

* as per PR

* Update k8s/base/deployment.yaml

Co-authored-by: Florian Forster <florian@caos.ch>

Co-authored-by: Florian Forster <florian@caos.ch>
This commit is contained in:
Christian Jakob 2020-05-28 14:12:37 +02:00 committed by GitHub
parent e3f9e9c05e
commit 5a7d44327e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 201 additions and 0 deletions

81
k8s/base/deployment.yaml Normal file
View File

@ -0,0 +1,81 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: zitadel
labels:
app: zitadel
spec:
replicas: 3
selector:
matchLabels:
app: zitadel
version: v1
template:
metadata:
labels:
app: zitadel
version: v1
spec:
containers:
- name: zitadel
image: docker.pkg.github.com/caos/zitadel/zitadel:latest
imagePullPolicy: IfNotPresent
args: ["-login=false", "-console=false"]
ports:
- name: management-rest
containerPort: 60021
- name: management-grpc
containerPort: 60020
- name: auth-rest
containerPort: 60051
- name: issuer-rest
containerPort: 60052
- name: auth-grpc
containerPort: 60050
- name: admin-rest
containerPort: 60091
- name: admin-grpc
containerPort: 60090
- name: console-http
containerPort: 9090
- name: accounts-http
containerPort: 61121
env:
- name: ZITADEL_GOOGLE_CHAT_URL
valueFrom:
secretKeyRef:
name: zitadel-secrets-vars
key: ZITADEL_GOOGLE_CHAT_URL
- name: ZITADEL_TWILIO_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: zitadel-secrets-vars
key: ZITADEL_TWILIO_AUTH_TOKEN
- name: ZITADEL_TWILIO_SID
valueFrom:
secretKeyRef:
name: zitadel-secrets-vars
key: ZITADEL_TWILIO_SID
- name: ZITADEL_EMAILAPPKEY
valueFrom:
secretKeyRef:
name: zitadel-secrets-vars
key: ZITADEL_EMAILAPPKEY
envFrom:
- configMapRef:
name: zitadel-vars
volumeMounts:
- name: zitadel-secret
mountPath: /secret
- name: console-config
mountPath: /app/console/dist/assets/environment.json
subPath: environment.json
imagePullSecrets:
- name: githubsecret
volumes:
- name: zitadel-secret
secret:
secretName: zitadel-secret
- name: console-config
configMap:
name: console-config

18
k8s/base/flow.yaml Normal file
View File

@ -0,0 +1,18 @@
apiVersion: logging.banzaicloud.io/v1beta1
kind: Flow
metadata:
name: flow-zitadel
spec:
filters:
- parser:
remove_key_name_field: true
reserve_data: true
parse:
type: logfmt
- tag_normaliser:
metadata: ${namespace}.${container}.${pod}
metadata_name: ${namespace_name}.${container_name}.${pod_name}
selectors:
app: zitadel
outputRefs:
- output-loki

View File

@ -0,0 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: zitadel
resources:
- deployment.yaml
- service-accounts.yaml
- service-api-admin.yaml
- service-api-auth.yaml
- service-api-mangagement.yaml
- service-console.yaml

13
k8s/base/output.yaml Normal file
View File

@ -0,0 +1,13 @@
apiVersion: logging.banzaicloud.io/v1beta1
kind: Output
metadata:
name: output-loki
spec:
loki:
buffer:
timekey: 1m
timekey_use_utc: true
timekey_wait: 30s
configure_kubernetes_labels: true
url: http://loki.caos-system:3100

View File

@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: accounts-v1
spec:
ports:
- name: http
port: 80
targetPort: accounts-http
selector:
app: zitadel
version: v1

View File

@ -0,0 +1,16 @@
---
apiVersion: v1
kind: Service
metadata:
name: api-admin-v1
spec:
ports:
- name: rest
port: 80
targetPort: admin-rest
- name: grpc
port: 8080
targetPort: admin-grpc
selector:
app: zitadel
version: v1

View File

@ -0,0 +1,19 @@
---
apiVersion: v1
kind: Service
metadata:
name: api-auth-v1
spec:
ports:
- name: rest
port: 80
targetPort: auth-rest
- name: issuer
port: 7070
targetPort: issuer-rest
- name: grpc
port: 8080
targetPort: auth-grpc
selector:
app: zitadel
version: v1

View File

@ -0,0 +1,16 @@
---
apiVersion: v1
kind: Service
metadata:
name: api-management-v1
spec:
ports:
- name: rest
port: 80
targetPort: management-rest
- name: grpc
port: 8080
targetPort: management-grpc
selector:
app: zitadel
version: v1

View File

@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: console-v1
spec:
ports:
- name: http
port: 80
targetPort: console-http
selector:
app: zitadel
version: v1