diff --git a/examples/patches-no-matches/base/deployment.yaml b/examples/patches-no-matches/base/deployment.yaml new file mode 100644 index 0000000000..a562ed09fe --- /dev/null +++ b/examples/patches-no-matches/base/deployment.yaml @@ -0,0 +1,66 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: "k8s-sidecar-injector-prod" + namespace: "kube-system" + labels: + k8s-app: "k8s-sidecar-injector" + track: "prod" +spec: + replicas: 2 + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + template: + metadata: + labels: + k8s-app: "k8s-sidecar-injector" + track: "prod" + spec: + serviceAccountName: k8s-sidecar-injector + volumes: + - name: secrets + secret: + secretName: k8s-sidecar-injector + containers: + - name: "k8s-sidecar-injector" + imagePullPolicy: Always + image: tumblr/k8s-sidecar-injector:latest + command: ["entrypoint.sh"] + args: [] + ports: + - name: https + containerPort: 9443 + - name: http-metrics + containerPort: 9000 + volumeMounts: + - name: secrets + mountPath: /var/lib/secrets + livenessProbe: + httpGet: + scheme: HTTPS + path: /health + port: https + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 3 + resources: + requests: + cpu: "0.5" + memory: 1Gi + limits: + cpu: "0.5" + memory: 2Gi + env: + - name: "TLS_CERT_FILE" + value: "/var/lib/secrets/sidecar-injector.crt" + - name: "TLS_KEY_FILE" + value: "/var/lib/secrets/sidecar-injector.key" + - name: "LOG_LEVEL" + value: "2" + - name: "CONFIG_DIR" + value: "conf/" + - name: "CONFIGMAP_LABELS" + value: "app=k8s-sidecar-injector" diff --git a/examples/patches-no-matches/base/kustomization.yaml b/examples/patches-no-matches/base/kustomization.yaml new file mode 100755 index 0000000000..e89291366b --- /dev/null +++ b/examples/patches-no-matches/base/kustomization.yaml @@ -0,0 +1,4 @@ +kind: Kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +resources: +- deployment.yaml diff --git a/examples/patches-no-matches/kustomization.yaml b/examples/patches-no-matches/kustomization.yaml new file mode 100644 index 0000000000..f1dd558eec --- /dev/null +++ b/examples/patches-no-matches/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +bases: +- base +patches: +- patches.yaml diff --git a/examples/patches-no-matches/patches.yaml b/examples/patches-no-matches/patches.yaml new file mode 100644 index 0000000000..3e4da4e73f --- /dev/null +++ b/examples/patches-no-matches/patches.yaml @@ -0,0 +1,14 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: "k8s-sidecar-injector-prod" +spec: + template: + spec: + containers: + - name: "k8s-sidecar-injector" + env: + - name: "TLS_CERT_FILE" + value: "/var/lib/secrets/tls.crt" + - name: "TLS_KEY_FILE" + value: "/var/lib/secrets/tls.key"