Verified Commit cfa033bb authored by egon w. stemle's avatar egon w. stemle
Browse files

Add kustomize basics

parent 445bc35d
Pipeline #11546 failed with stages
in 1 minute and 40 seconds
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: deployment
spec:
replicas: 1
selector:
matchLabels:
app: app
template:
metadata:
labels:
app: app
spec:
containers:
- name: webserver
imagePullPolicy: Always
resources: {}
ports:
- name: http
containerPort: 80
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
spec:
rules:
- host: HOST
http:
paths:
- backend:
serviceName: service-http
servicePort: 80
path: /PATH
tls:
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
- ingress.yaml
---
apiVersion: v1
kind: Service
metadata:
name: service-http
spec:
ports:
- name: http
port: 80
selector:
app: app
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: deployment
spec:
template:
spec:
containers:
- name: webserver
image: WEBSERVER
ports:
- name: http
containerPort: 80
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
annotations:
ingress.kubernetes.io/configuration-snippet: |
rewrite ^(/PATH)$ $1/ permanent;
ingress.kubernetes.io/rewrite-target: /
kubernetes.io/tls-acme: "true"
spec:
rules:
- host: HOST
http:
paths:
- backend:
serviceName: service-http
servicePort: 80
path: /PATH
tls:
- hosts:
- kommul-dev.eurac.edu
secretName: kommul-dev.eurac.edu-NAME-tls
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- ../../base
patchesStrategicMerge:
- deployment.yaml
- ingress.yaml
namePrefix: merlin-platform-
# nameSuffix: -v1
commonLabels:
variant: staging
org: commul
app: merlin-webpage
commonAnnotations:
note: merlin-platform-note
namespace: kommul-dev
images:
- name: WEBSERVER
newName: gitlab.inf.unibz.it:4567/commul/merlin-platform/www/master:445bc35dde4520cab61a36c793c7c5a626f43e62
patchesJSON6902:
- target:
group: extensions
version: v1beta1
kind: Ingress
name: ingress
patch: |-
- op: replace
path: /metadata/annotations/ingress.kubernetes.io~1configuration-snippet
value: |
rewrite ^(/merlin)$ $1/ permanent;
- op: replace
path: /spec/rules/0/host
value: kommul-dev.eurac.edu
- op: replace
path: /spec/rules/0/http/paths/0/path
value: /merlin
- op: replace
path: /spec/tls/0/secretName
value: kommul-dev.eurac.edu-merlin-tls
Supports Markdown
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