Skip to content

Instantly share code, notes, and snippets.

@andmos
Created August 17, 2020 13:26
Show Gist options
  • Save andmos/6833f5efeef8a2782dd4fa07904a7776 to your computer and use it in GitHub Desktop.
Save andmos/6833f5efeef8a2782dd4fa07904a7776 to your computer and use it in GitHub Desktop.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment