Merge pull request #1 from StephGit/add-kustomize-example
add kustomize example
This commit is contained in:
commit
42d7d76681
20
kustomize/overlays-example/base/deploymentconfig.yaml
Normal file
20
kustomize/overlays-example/base/deploymentconfig.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: overlays-example
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
||||||
|
revisionHistoryLimit: 3
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: overlays-example
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: overlays-example
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: quay.io/acend/example-web-go
|
||||||
|
name: overlays-example
|
||||||
|
ports:
|
||||||
|
- containerPort: 5000
|
17
kustomize/overlays-example/base/kustomization.yaml
Normal file
17
kustomize/overlays-example/base/kustomization.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
commonLabels:
|
||||||
|
app: overlays-example
|
||||||
|
app.kubernetes.io/managed-by: kustomize
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- deploymentconfig.yaml
|
||||||
|
- service.yaml
|
||||||
|
|
||||||
|
|
||||||
|
generatorOptions:
|
||||||
|
# commonLabels will not be respected by generator
|
||||||
|
labels:
|
||||||
|
app: overlays-example
|
||||||
|
app.kubernetes.io/managed-by: kustomize
|
19
kustomize/overlays-example/base/service.yaml
Normal file
19
kustomize/overlays-example/base/service.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app: overlays-example
|
||||||
|
appStageTag: development
|
||||||
|
name: overlays-example
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: 8080-tcp
|
||||||
|
port: 8080
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8080
|
||||||
|
selector:
|
||||||
|
deploymentconfig: overlays-example
|
||||||
|
sessionAffinity: None
|
||||||
|
type: ClusterIP
|
@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: overlays-example
|
||||||
|
spec:
|
||||||
|
replicas: 4
|
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
bases:
|
||||||
|
- ../../base
|
||||||
|
|
||||||
|
commonLabels:
|
||||||
|
appStageTag: production
|
||||||
|
|
||||||
|
generatorOptions:
|
||||||
|
# commonLabels will not be respected by generator
|
||||||
|
labels:
|
||||||
|
app: overlays-example
|
||||||
|
app.kubernetes.io/managed-by: kustomize
|
||||||
|
appStageTag: production
|
||||||
|
|
||||||
|
|
||||||
|
patchesStrategicMerge:
|
||||||
|
- deploymentconfig.yaml
|
||||||
|
# - service.yaml
|
20
kustomize/simple-example/deploymentconfig.yaml
Normal file
20
kustomize/simple-example/deploymentconfig.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: simple-example
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
||||||
|
revisionHistoryLimit: 3
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: simple-example
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: simple-example
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: quay.io/acend/example-web-go
|
||||||
|
name: simple-example
|
||||||
|
ports:
|
||||||
|
- containerPort: 5000
|
17
kustomize/simple-example/kustomization.yaml
Normal file
17
kustomize/simple-example/kustomization.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
commonLabels:
|
||||||
|
app: simple-example
|
||||||
|
app.kubernetes.io/managed-by: kustomize
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- deploymentconfig.yaml
|
||||||
|
- service.yaml
|
||||||
|
|
||||||
|
|
||||||
|
generatorOptions:
|
||||||
|
# commonLabels will not be respected by generator
|
||||||
|
labels:
|
||||||
|
app: simple-example
|
||||||
|
app.kubernetes.io/managed-by: kustomize
|
19
kustomize/simple-example/service.yaml
Normal file
19
kustomize/simple-example/service.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app: simple-example
|
||||||
|
appStageTag: development
|
||||||
|
name: simple-example
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: 8080-tcp
|
||||||
|
port: 8080
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8080
|
||||||
|
selector:
|
||||||
|
deploymentconfig: simple-example
|
||||||
|
sessionAffinity: None
|
||||||
|
type: ClusterIP
|
Loading…
x
Reference in New Issue
Block a user