To use kustomize with OpenShift:
git clone https://github.com/adnovum/kustomize-openshift
tree
├── base
│ ├── kustomization.yaml
│ ├── readinglist-deployment.yaml
│ └── readinglist-svc.yaml
└── overlays
└── prod
├── crds
│ ├── openshift-deploymentconfig.json
│ └── openshift-route.json
├── environment.yaml
├── kustomization.yaml
├── out
│ └── prod.yaml
├── replica-and-rollout-strategy.yaml
├── route.yaml
└── secrets.env
cat overlays/prod/route.yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: readinglist
labels:
app: readinglist
spec:
host: readinglist.apps.datest.no
tls:
termination: edge
to:
kind: Service
name: readinglist
cat kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
patchesStrategicMerge:
- environment.yaml
- replica-and-rollout-strategy.yaml
resources:
- ../../base
secretGenerator:
- envs:
- secrets.env
name: readinglistsecrets
type: Opaque