promenade/charts/apiserver/templates
Phil Sphicas 3e28b0ee2d Fix kube-apiserver anchor script rendering
This change corrects two rendering issues in the kube-apiserver anchor
script. The details and impact are mentioned below.

1. The kube-apiserver anchor script fails to clean up some files from
the host, because the path is incomplete. For example, the cleanup()
function of the script includes:

    rm -f "/host/acconfig.yaml"

instead of

    rm -f "/host/etc/kubernetes/apiserver/acconfig.yaml"

2. A recent change to allow fileless command options [0] caused some
extraneous lines to end up in the script. For example, the rendered
script includes:

    snapshot_files() {
        cp "/tmp/etc/" "${SNAPSHOT_DIR}/etc/kubernetes/apiserver/"
    }

    compare_copy_files() {
        SRC="${SNAPSHOT_DIR}/etc/kubernetes/apiserver/"
        DEST="/host/etc/kubernetes/apiserver/"
        if [ ! -e "${DEST}" ] || ! cmp -s "${SRC}" "${DEST}"; then
            mkdir -p $(dirname "${DEST}")
            cp "${SRC}" "${DEST}"
            chmod go-rwx "${DEST}"
        fi
    }

    cleanup() {
        rm -f "/host/"
    }

Since the 'cp' and 'rm' commands don't include '-r', this is actually
non-impacting, other than some log messages.

0: https://review.opendev.org/c/airship/promenade/+/788092

Change-Id: Id0a47727d56268d13ebb4718b8578d94272c2181
2021-08-09 16:45:24 +00:00
..
bin Fix kube-apiserver anchor script rendering 2021-08-09 16:45:24 +00:00
etc apiserver(-webhook): Allow volume overrides 2021-04-21 21:52:29 +00:00
configmap-bin.yaml (apiserver) support key rotation 2019-04-29 09:31:24 -05:00
configmap-certs.yaml Use separate CA for kubelet authorization 2018-08-28 09:38:34 -05:00
configmap-etc.yaml apiserver(-webhook): Allow fileless kube-apiserver command_options 2021-04-28 05:18:16 +00:00
daemonset.yaml Add configmap-etc-hash to apiserver anchor 2021-03-15 17:18:58 +00:00
ingress-api.yaml Opening apiserver Via Ingress 2018-08-10 08:16:50 -05:00
job-key-rotate.yaml Implement helm-toolkit snippet to apiserver and webhook pods/containers 2020-07-02 14:52:19 +00:00
rbac.yaml Add Additional Liveness Probes for apiserver 2018-06-26 09:29:07 -05:00
secret-apiserver.yaml Add required apiserver serviceaccount flags 2021-04-30 22:45:43 +00:00
secret-ingress-tls.yaml Opening apiserver Via Ingress 2018-08-10 08:16:50 -05:00
service-apiserver-ingress.yaml Opening apiserver Via Ingress 2018-08-10 08:16:50 -05:00
service.yaml Tolerate unready endpoints for apiserver service 2018-07-19 13:29:18 -05:00