Skip to content

Instantly share code, notes, and snippets.

@jamcole
Last active July 30, 2020 14:16

Revisions

  1. jamcole revised this gist Jul 30, 2020. 1 changed file with 8 additions and 3 deletions.
    11 changes: 8 additions & 3 deletions example-dc.yaml
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ initContainers:
    - -c
    - cp
    /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt
    /usr/share/pki/ca-trust-source/anchors && mkdir -p
    /usr/share/pki/ca-trust-source/anchors/k8s && mkdir -p
    /etc/pki/ca-trust/extracted/pem
    /etc/pki/ca-trust/extracted/openssl
    /etc/pki/ca-trust/extracted/java && update-ca-trust
    @@ -13,13 +13,18 @@ initContainers:
    imagePullPolicy: IfNotPresent
    name: update-certs
    volumeMounts:
    - mountPath: /usr/share/pki/ca-trust-source/anchors
    - mountPath: /usr/share/pki/ca-trust-source/anchors/ca
    name: ca-anchors
    - mountPath: /usr/share/pki/ca-trust-source/anchors/k8s
    name: k8s-ca-anchors
    - mountPath: /etc/pki/ca-trust/extracted
    name: ca-extracted
    # skipped...
    volumes:
    - emptyDir: {}
    - configMap:
    name: ca-anchors
    name: ca-anchors
    - emptyDir: {}
    name: k8s-ca-anchors
    - emptyDir: {}
    name: ca-extracted
  2. jamcole created this gist Jul 1, 2020.
    25 changes: 25 additions & 0 deletions example-dc.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    initContainers:
    - args:
    - -c
    - cp
    /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt
    /usr/share/pki/ca-trust-source/anchors && mkdir -p
    /etc/pki/ca-trust/extracted/pem
    /etc/pki/ca-trust/extracted/openssl
    /etc/pki/ca-trust/extracted/java && update-ca-trust
    command:
    - /bin/bash
    image: rhel7/support-tools:7.6
    imagePullPolicy: IfNotPresent
    name: update-certs
    volumeMounts:
    - mountPath: /usr/share/pki/ca-trust-source/anchors
    name: ca-anchors
    - mountPath: /etc/pki/ca-trust/extracted
    name: ca-extracted
    # skipped...
    volumes:
    - emptyDir: {}
    name: ca-anchors
    - emptyDir: {}
    name: ca-extracted