promenade/charts/apiserver
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
..
templates Fix kube-apiserver anchor script rendering 2021-08-09 16:45:24 +00:00
Chart.yaml Use HostToContainer mountPropagation 2021-01-08 01:05:04 +00:00
requirements.yaml Change helm-toolkit dependency version to ">= 0.1.0" 2020-09-24 19:43:10 -05:00
values.yaml Fix deprecated warning in Promenade apiserver chart 2021-06-29 16:14:17 +00:00