diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 973c3feb..b68950a6 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -105,7 +105,7 @@ jobs: echo "Installing resources..." kubectl apply -f "test/resources/resources.yaml" pods=("sidecar" "sidecar-5xx" "sidecar-pythonscript") - resources=("sample-configmap" "sample-secret-binary" "absolute-configmap" "relative-configmap" "change-dir-configmap" "url-configmap-500" "url-configmap-basic-auth" "sample-configmap") + resources=("sample-configmap" "sample-secret-binary" "absolute-configmap" "relative-configmap" "change-dir-configmap" "similar-configmap-secret" "url-configmap-500" "url-configmap-basic-auth" "sample-configmap") for p in ${pods[*]}; do for r in ${resources[*]}; do wait_for_pod_log $p $r @@ -115,43 +115,58 @@ jobs: sleep 5 - name: Retrieve pod logs run: | - kubectl logs sidecar > /tmp/sidecar.log - kubectl logs sidecar-5xx > /tmp/sidecar-5xx.log - kubectl logs sidecar-pythonscript > /tmp/sidecar-pythonscript.log - kubectl logs dummy-server-pod > /tmp/dummy-server.log - - name: Upload artifacts + mkdir /tmp/logs + kubectl logs sidecar > /tmp/logs/sidecar.log + kubectl logs sidecar-5xx > /tmp/logs/sidecar-5xx.log + kubectl logs sidecar-pythonscript > /tmp/logs/sidecar-pythonscript.log + kubectl logs dummy-server-pod > /tmp/logs/dummy-server.log + - name: Upload artifacts (pod logs) uses: actions/upload-artifact@v3 with: name: pod-logs_${{ matrix.k8s.maj_min }} - path: /tmp/*.log + path: /tmp/logs/* - name: Download expected files from cluster run: | + mkdir /tmp/sidecar + mkdir /tmp/sidecar-5xx echo "Downloading resource files from sidecar..." - kubectl cp sidecar:/tmp/hello.world /tmp/hello.world - kubectl cp sidecar:/tmp/cm-kubelogo.png /tmp/cm-kubelogo.png - kubectl cp sidecar:/tmp/secret-kubelogo.png /tmp/secret-kubelogo.png - kubectl cp sidecar:/tmp/url-downloaded-kubelogo.png /tmp/url-downloaded-kubelogo.png - kubectl cp sidecar:/tmp/script_result /tmp/script_result - kubectl cp sidecar:/tmp/absolute/absolute.txt /tmp/absolute.txt - kubectl cp sidecar:/tmp/relative/relative.txt /tmp/relative.txt - kubectl cp sidecar:/tmp/orig-dir/change-dir.txt /tmp/change-dir.txt - kubectl cp sidecar:/tmp/500.txt /tmp/500.txt || true - kubectl cp sidecar:/tmp/secured.txt /tmp/secured.txt + kubectl cp sidecar:/tmp/hello.world /tmp/sidecar/hello.world + kubectl cp sidecar:/tmp/cm-kubelogo.png /tmp/sidecar/cm-kubelogo.png + kubectl cp sidecar:/tmp/secret-kubelogo.png /tmp/sidecar/secret-kubelogo.png + kubectl cp sidecar:/tmp/url-downloaded-kubelogo.png /tmp/sidecar/url-downloaded-kubelogo.png + # script also generates into '/tmp' + kubectl cp sidecar:/tmp/script_result /tmp/sidecar/script_result + # absolute path in configmap points to /tmp in 'absolute-configmap' + kubectl cp sidecar:/tmp/absolute/absolute.txt /tmp/sidecar/absolute.txt + kubectl cp sidecar:/tmp/relative/relative.txt /tmp/sidecar/relative.txt + kubectl cp sidecar:/tmp/orig-dir/change-dir.txt /tmp/sidecar/change-dir.txt + kubectl cp sidecar:/tmp/500.txt /tmp/sidecar/500.txt || true + kubectl cp sidecar:/tmp/secured.txt /tmp/sidecar/secured.txt + kubectl cp sidecar:/tmp/similar-configmap.txt /tmp/sidecar/similar-configmap.txt + kubectl cp sidecar:/tmp/similar-secret.txt /tmp/sidecar/similar-secret.txt echo "Downloading resource files from sidecar-5xx..." - kubectl cp sidecar-5xx:/tmp-5xx/hello.world /tmp/5xx/hello.world - kubectl cp sidecar-5xx:/tmp-5xx/cm-kubelogo.png /tmp/5xx/cm-kubelogo.png - kubectl cp sidecar-5xx:/tmp-5xx/secret-kubelogo.png /tmp/5xx/secret-kubelogo.png - kubectl cp sidecar-5xx:/tmp-5xx/url-downloaded-kubelogo.png /tmp/5xx/url-downloaded-kubelogo.png + kubectl cp sidecar-5xx:/tmp-5xx/hello.world /tmp/sidecar-5xx/hello.world + kubectl cp sidecar-5xx:/tmp-5xx/cm-kubelogo.png /tmp/sidecar-5xx/cm-kubelogo.png + kubectl cp sidecar-5xx:/tmp-5xx/secret-kubelogo.png /tmp/sidecar-5xx/secret-kubelogo.png + kubectl cp sidecar-5xx:/tmp-5xx/url-downloaded-kubelogo.png /tmp/sidecar-5xx/url-downloaded-kubelogo.png # script also generates into '/tmp' - kubectl cp sidecar-5xx:/tmp/script_result /tmp/5xx/script_result + kubectl cp sidecar-5xx:/tmp/script_result /tmp/sidecar-5xx/script_result # absolute path in configmap points to /tmp in 'absolute-configmap' - kubectl cp sidecar-5xx:/tmp/absolute/absolute.txt /tmp/5xx/absolute.txt - kubectl cp sidecar-5xx:/tmp-5xx/relative/relative.txt /tmp/5xx/relative.txt - kubectl cp sidecar-5xx:/tmp-5xx/orig-dir/change-dir.txt /tmp/5xx/change-dir.txt - kubectl cp sidecar-5xx:/tmp-5xx/500.txt /tmp/5xx/500.txt - kubectl cp sidecar-5xx:/tmp-5xx/secured.txt /tmp/5xx/secured.txt - + kubectl cp sidecar-5xx:/tmp/absolute/absolute.txt /tmp/sidecar-5xx/absolute.txt + kubectl cp sidecar-5xx:/tmp-5xx/relative/relative.txt /tmp/sidecar-5xx/relative.txt + kubectl cp sidecar-5xx:/tmp-5xx/orig-dir/change-dir.txt /tmp/sidecar-5xx/change-dir.txt + kubectl cp sidecar-5xx:/tmp-5xx/500.txt /tmp/sidecar-5xx/500.txt + kubectl cp sidecar-5xx:/tmp-5xx/secured.txt /tmp/sidecar-5xx/secured.txt + kubectl cp sidecar-5xx:/tmp-5xx/similar-configmap.txt /tmp/sidecar-5xx/similar-configmap.txt + kubectl cp sidecar-5xx:/tmp-5xx/similar-secret.txt /tmp/sidecar-5xx/similar-secret.txt + - name: Upload artifacts (expected files from cluster) + uses: actions/upload-artifact@v3 + with: + name: expected-files_${{ matrix.k8s.maj_min }} + path: | + /tmp/sidecar/** + /tmp/sidecar-5xx/** - name: Update Configmaps and Secrets run: | sleep 5 @@ -163,7 +178,7 @@ jobs: echo "Updating resources..." kubectl apply -f "test/resources/change_resources.yaml" pods=("sidecar" "sidecar-5xx") - resources=("sample-configmap" "sample-secret-binary" "absolute-configmap" "relative-configmap" "change-dir-configmap" "url-configmap-500" "url-configmap-basic-auth" "sample-configmap") + resources=("sample-configmap" "sample-secret-binary" "absolute-configmap" "relative-configmap" "change-dir-configmap" "similar-configmap-secret" "url-configmap-500" "url-configmap-basic-auth" "sample-configmap") for p in ${pods[*]}; do for r in ${resources[*]}; do wait_for_pod_log $p $r @@ -171,35 +186,46 @@ jobs: done # 20 more seconds after the last thing appeared in the logs. sleep 20 - - name: Verify files + - name: Verify sidecar files after initial sync + run: | + echo -n "Hello World!" | diff - /tmp/sidecar/hello.world && + diff test/kubelogo.png /tmp/sidecar/cm-kubelogo.png && + diff test/kubelogo.png /tmp/sidecar/secret-kubelogo.png && + diff test/kubelogo.png /tmp/sidecar/url-downloaded-kubelogo.png && + echo -n "This absolutely exists" | diff - /tmp/sidecar/absolute.txt && + echo -n "This relatively exists" | diff - /tmp/sidecar/relative.txt && + echo -n "This change-dir exists" | diff - /tmp/sidecar/change-dir.txt && + echo -n "I'm very similar" | diff - /tmp/sidecar/similar-configmap.txt && + echo -n "I'm very similar" | diff - /tmp/sidecar/similar-secret.txt && + echo -n "allowed" | diff - /tmp/sidecar/secured.txt && + [ ! -f /tmp/sidecar/500.txt ] && echo "No 5xx file created" && + ls /tmp/sidecar/script_result + - name: Verify sidecar-5xx files after initial sync + run: | + echo -n '{"detail":"Not authenticated"}' | diff - /tmp/sidecar-5xx/secured.txt && + echo -n "Hello World!" | diff - /tmp/sidecar-5xx/hello.world && + diff test/kubelogo.png /tmp/sidecar-5xx/cm-kubelogo.png && + diff test/kubelogo.png /tmp/sidecar-5xx/secret-kubelogo.png && + diff test/kubelogo.png /tmp/sidecar-5xx/url-downloaded-kubelogo.png && + echo -n "This absolutely exists" | diff - /tmp/sidecar-5xx/absolute.txt && + echo -n "This relatively exists" | diff - /tmp/sidecar-5xx/relative.txt && + echo -n "This change-dir exists" | diff - /tmp/sidecar-5xx/change-dir.txt && + echo -n "I'm very similar" | diff - /tmp/sidecar-5xx/similar-configmap.txt && + echo -n "I'm very similar" | diff - /tmp/sidecar-5xx/similar-secret.txt && + echo -n "500" | diff - /tmp/sidecar-5xx/500.txt && + ls /tmp/sidecar-5xx/script_result + - name: Verify sidecar-python logs after initial sync + run: | + # Make sure to update this number this when adding or removing configmap or secrets + test $(cat /tmp/logs/sidecar-pythonscript.log | grep "Hello from python script!" | wc -l) = "9" + - name: Verify sidecar files after update run: | - echo "Verifying file content from sidecar and sidecar-5xx ..." - # this needs to be the last statement so that it defines the script exit code - echo -n "Hello World!" | diff - /tmp/hello.world && - diff test/kubelogo.png /tmp/cm-kubelogo.png && - diff test/kubelogo.png /tmp/secret-kubelogo.png && - diff test/kubelogo.png /tmp/url-downloaded-kubelogo.png && - echo -n "This absolutely exists" | diff - /tmp/absolute.txt && - echo -n "This relatively exists" | diff - /tmp/relative.txt && - echo -n "This change-dir exists" | diff - /tmp/change-dir.txt && - echo -n "allowed" | diff - /tmp/secured.txt && - echo -n '{"detail":"Not authenticated"}' | diff - /tmp/5xx/secured.txt && - [ ! -f /tmp/500.txt ] && echo "No 5xx file created" && - ls /tmp/script_result && - echo -n "Hello World!" | diff - /tmp/5xx/hello.world && - diff test/kubelogo.png /tmp/5xx/cm-kubelogo.png && - diff test/kubelogo.png /tmp/5xx/secret-kubelogo.png && - diff test/kubelogo.png /tmp/5xx/url-downloaded-kubelogo.png && - echo -n "This absolutely exists" | diff - /tmp/5xx/absolute.txt && - echo -n "This relatively exists" | diff - /tmp/5xx/relative.txt && - echo -n "This change-dir exists" | diff - /tmp/5xx/change-dir.txt && - echo -n "500" | diff - /tmp/5xx/500.txt && - ls /tmp/5xx/script_result && - kubectl exec sidecar -- sh -c "ls /tmp/" && - kubectl exec sidecar -- sh -c "! test -e /tmp/hello.world" && kubectl exec sidecar -- sh -c "test -e /tmp/change-hello.world" && - kubectl exec sidecar -- sh -c "! test -e /tmp/cm-kubelogo.png" && kubectl exec sidecar -- sh -c "test -e /tmp/change-cm-kubelogo.png" && - kubectl exec sidecar -- sh -c "! test -e /tmp/secret-kubelogo.png" && kubectl exec sidecar -- sh -c "test -e /tmp/change-secret-kubelogo.png" && - kubectl exec sidecar -- sh -c "! test -e /tmp/absolute/absolute.txt" && kubectl exec sidecar -- sh -c "test -e /tmp/absolute/change-absolute.txt" && - kubectl exec sidecar -- sh -c "! test -e /tmp/relative/relative.txt" && kubectl exec sidecar -- sh -c "test -e /tmp/relative/change-relative.txt" && - kubectl exec sidecar -- sh -c "! test -e /tmp/orig-dir/change-dir.txt" && kubectl exec sidecar -- sh -c "test -e /tmp/new-dir/change-dir.txt" && - test $(cat /tmp/sidecar-pythonscript.log | grep "Hello from python script!" | wc -l) = "7" + kubectl exec sidecar -- sh -c "ls /tmp/" && + kubectl exec sidecar -- sh -c "! test -e /tmp/hello.world" && kubectl exec sidecar -- sh -c "test -e /tmp/change-hello.world" && + kubectl exec sidecar -- sh -c "! test -e /tmp/cm-kubelogo.png" && kubectl exec sidecar -- sh -c "test -e /tmp/change-cm-kubelogo.png" && + kubectl exec sidecar -- sh -c "! test -e /tmp/secret-kubelogo.png" && kubectl exec sidecar -- sh -c "test -e /tmp/change-secret-kubelogo.png" && + kubectl exec sidecar -- sh -c "! test -e /tmp/absolute/absolute.txt" && kubectl exec sidecar -- sh -c "test -e /tmp/absolute/change-absolute.txt" && + kubectl exec sidecar -- sh -c "! test -e /tmp/relative/relative.txt" && kubectl exec sidecar -- sh -c "test -e /tmp/relative/change-relative.txt" && + kubectl exec sidecar -- sh -c "! test -e /tmp/orig-dir/change-dir.txt" && kubectl exec sidecar -- sh -c "test -e /tmp/new-dir/change-dir.txt" && + kubectl exec sidecar -- sh -c "! test -e /tmp/similar-configmap.txt" && kubectl exec sidecar -- sh -c "test -e /tmp/change-similar-configmap.txt" && + kubectl exec sidecar -- sh -c "! test -e /tmp/similar-secret.txt" && kubectl exec sidecar -- sh -c "test -e /tmp/change-similar-secret.txt" diff --git a/src/helpers.py b/src/helpers.py index 1fcee039..85fa4d98 100755 --- a/src/helpers.py +++ b/src/helpers.py @@ -89,6 +89,7 @@ def write_data_to_file(folder, filename, data, data_type=CONTENT_TYPE_TEXT): else: write_type = "w" + logger.info(f"Writing {absolute_path} ({data_type})") with open(absolute_path, write_type) as f: f.write(data) f.close() @@ -101,10 +102,11 @@ def write_data_to_file(folder, filename, data, data_type=CONTENT_TYPE_TEXT): def remove_file(folder, filename): complete_file = os.path.join(folder, filename) if os.path.isfile(complete_file): + logger.info(f"Removing {complete_file}") os.remove(complete_file) return True else: - print(f"{timestamp()} Error: {complete_file} file not found") + logger.error(f"Unable to remove {complete_file}, file not found") return False diff --git a/src/resources.py b/src/resources.py index a6c349dc..bcf7a676 100755 --- a/src/resources.py +++ b/src/resources.py @@ -12,11 +12,11 @@ from kubernetes import client, watch from kubernetes.client.rest import ApiException -from urllib3.exceptions import MaxRetryError -from urllib3.exceptions import ProtocolError +from urllib3.exceptions import MaxRetryError, ProtocolError -from helpers import request, write_data_to_file, remove_file, unique_filename, CONTENT_TYPE_TEXT, \ - CONTENT_TYPE_BASE64_BINARY, execute, WATCH_SERVER_TIMEOUT, WATCH_CLIENT_TIMEOUT +from helpers import (CONTENT_TYPE_BASE64_BINARY, CONTENT_TYPE_TEXT, + WATCH_CLIENT_TIMEOUT, WATCH_SERVER_TIMEOUT, execute, + remove_file, request, unique_filename, write_data_to_file) from logger import get_logger RESOURCE_SECRET = "secret" @@ -30,9 +30,18 @@ RESOURCE_CONFIGMAP: "list_config_map_for_all_namespaces" }}) -_resources_version_map = {} -_resources_object_map = {} -_resources_dest_folder_map = {} +_resources_version_map = { + RESOURCE_SECRET: {}, + RESOURCE_CONFIGMAP: {}, +} +_resources_object_map = { + RESOURCE_SECRET: {}, + RESOURCE_CONFIGMAP: {}, +} +_resources_dest_folder_map = { + RESOURCE_SECRET: {}, + RESOURCE_CONFIGMAP: {}, +} # Get logger logger = get_logger() @@ -91,6 +100,8 @@ def list_resources(label, label_value, target_folder, request_url, request_metho if namespace != "ALL": additional_args['namespace'] = namespace + logger.info(f"Performing list-based sync on {resource} resources: {additional_args}") + ret = getattr(v1, _list_namespace[namespace][resource])(**additional_args) files_changed = False @@ -104,11 +115,11 @@ def list_resources(label, label_value, target_folder, request_url, request_metho # Ignore already processed resource # Avoid numerous logs about useless resource processing each time the LIST loop reconnects if ignore_already_processed: - if _resources_version_map.get(metadata.namespace + metadata.name) == metadata.resource_version: + if _resources_version_map[resource].get(metadata.namespace + metadata.name) == metadata.resource_version: logger.debug(f"Ignoring {resource} {metadata.namespace}/{metadata.name}") continue - _resources_version_map[metadata.namespace + metadata.name] = metadata.resource_version + _resources_version_map[resource][metadata.namespace + metadata.name] = metadata.resource_version logger.debug(f"Working on {resource}: {metadata.namespace}/{metadata.name}") @@ -121,13 +132,16 @@ def list_resources(label, label_value, target_folder, request_url, request_metho files_changed = _process_secret(dest_folder, item, resource, unique_filenames, enable_5xx) # Clear the cache that is not listed. - for key in set(_resources_object_map.keys()) - exist_keys: - item = _resources_object_map.get(key) + for key in set(_resources_object_map[resource].keys()) - exist_keys: + item = _resources_object_map[resource].get(key) + metadata = item.metadata + + logger.debug(f"Removing {resource}: {metadata.namespace}/{metadata.name}") if resource == RESOURCE_CONFIGMAP: - files_changed |= _process_config_map(dest_folder, item, resource, unique_filenames, enable_5xx, True) + files_changed |= _process_config_map(None, item, resource, unique_filenames, enable_5xx, True) else: - files_changed = _process_secret(dest_folder, item, resource, unique_filenames, enable_5xx, True) + files_changed = _process_secret(None, item, resource, unique_filenames, enable_5xx, True) if script and files_changed: execute(script) @@ -139,13 +153,13 @@ def list_resources(label, label_value, target_folder, request_url, request_metho def _process_secret(dest_folder, secret, resource, unique_filenames, enable_5xx, is_removed=False): files_changed = False - old_secret = _resources_object_map.get(secret.metadata.namespace + secret.metadata.name) or copy.deepcopy(secret) - old_dest_folder = _resources_dest_folder_map.get(secret.metadata.namespace + secret.metadata.name) or dest_folder + old_secret = _resources_object_map[resource].get(secret.metadata.namespace + secret.metadata.name) or copy.deepcopy(secret) + old_dest_folder = _resources_dest_folder_map[resource].get(secret.metadata.namespace + secret.metadata.name) or dest_folder if is_removed: - _resources_object_map.pop(secret.metadata.namespace + secret.metadata.name, None) + _resources_object_map[resource].pop(secret.metadata.namespace + secret.metadata.name, None) else: - _resources_object_map[secret.metadata.namespace + secret.metadata.name] = copy.deepcopy(secret) - _resources_dest_folder_map[secret.metadata.namespace + secret.metadata.name] = dest_folder + _resources_object_map[resource][secret.metadata.namespace + secret.metadata.name] = copy.deepcopy(secret) + _resources_dest_folder_map[resource][secret.metadata.namespace + secret.metadata.name] = dest_folder if secret.data is None: logger.warning(f"No data field in {resource}") @@ -179,13 +193,13 @@ def _process_secret(dest_folder, secret, resource, unique_filenames, enable_5xx, def _process_config_map(dest_folder, config_map, resource, unique_filenames, enable_5xx, is_removed=False): files_changed = False - old_config_map = _resources_object_map.get(config_map.metadata.namespace + config_map.metadata.name) or copy.deepcopy(config_map) - old_dest_folder = _resources_dest_folder_map.get(config_map.metadata.namespace + config_map.metadata.name) or dest_folder + old_config_map = _resources_object_map[resource].get(config_map.metadata.namespace + config_map.metadata.name) or copy.deepcopy(config_map) + old_dest_folder = _resources_dest_folder_map[resource].get(config_map.metadata.namespace + config_map.metadata.name) or dest_folder if is_removed: - _resources_object_map.pop(config_map.metadata.namespace + config_map.metadata.name, None) + _resources_object_map[resource].pop(config_map.metadata.namespace + config_map.metadata.name, None) else: - _resources_object_map[config_map.metadata.namespace + config_map.metadata.name] = copy.deepcopy(config_map) - _resources_dest_folder_map[config_map.metadata.namespace + config_map.metadata.name] = dest_folder + _resources_object_map[resource][config_map.metadata.namespace + config_map.metadata.name] = copy.deepcopy(config_map) + _resources_dest_folder_map[resource][config_map.metadata.namespace + config_map.metadata.name] = dest_folder if config_map.data is None and config_map.binary_data is None: logger.warning(f"No data/binaryData field in {resource}") @@ -272,10 +286,8 @@ def _update_file(data_key, data_content, dest_folder, metadata, resource, resource=resource, resource_name=metadata.name) if not remove: - logger.debug(f"Writing {filename}") return write_data_to_file(dest_folder, filename, file_data, content_type) else: - logger.debug(f"Deleting {filename}") return remove_file(dest_folder, filename) except Exception: logger.exception(f"Error when updating from '%s' into '%s'", data_key, dest_folder) @@ -297,6 +309,8 @@ def _watch_resource_iterator(label, label_value, target_folder, request_url, req if namespace != "ALL": additional_args['namespace'] = namespace + logger.debug(f"Performing watch-based sync on {resource} resources: {additional_args}") + stream = watch.Watch().stream(getattr(v1, _list_namespace[namespace][resource]), **additional_args) # Process events @@ -308,15 +322,15 @@ def _watch_resource_iterator(label, label_value, target_folder, request_url, req # Ignore already processed resource # Avoid numerous logs about useless resource processing each time the WATCH loop reconnects if ignore_already_processed: - if _resources_version_map.get(metadata.namespace + metadata.name) == metadata.resource_version: + if _resources_version_map[resource].get(metadata.namespace + metadata.name) == metadata.resource_version: if event_type == "ADDED" or event_type == "MODIFIED": logger.debug(f"Ignoring {event_type} {resource} {metadata.namespace}/{metadata.name}") continue elif event_type == "DELETED": - _resources_version_map.pop(metadata.namespace + metadata.name) + _resources_version_map[resource].pop(metadata.namespace + metadata.name) if event_type == "ADDED" or event_type == "MODIFIED": - _resources_version_map[metadata.namespace + metadata.name] = metadata.resource_version + _resources_version_map[resource][metadata.namespace + metadata.name] = metadata.resource_version logger.debug(f"Working on {event_type} {resource} {metadata.namespace}/{metadata.name}") diff --git a/test/resources/change_resources.yaml b/test/resources/change_resources.yaml index 3a95e555..a83ba301 100644 --- a/test/resources/change_resources.yaml +++ b/test/resources/change_resources.yaml @@ -6,7 +6,7 @@ metadata: findme: "yea" data: change-hello.world: |- - Hello World! + Hello World! binaryData: change-cm-kubelogo.png: iVBORw0KGgoAAAANSUhEUgAAAUAAAAA5CAYAAABHyvIXAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mA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QgQYNC0w0luiyVT1c98Up8ocnuU875dlLrL7D4TJkzUBWEFlH+9qH2u2+oZh3HuunqxHSiqMskkPxMmTDQaAQLsmNd+B8IBtuHYD/WvW59LXWV2mwkTJhqVAAG2LUx7Q1GVa1Thg1TfeHF7UtqjZpeZMGEiUohIsH2fOUdjrWXqcMWipke6gipqAar64/aF7b81u8uECRMmTJgwYSIC+H/DglRlbodP6AAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNy0xMC0wN1QxOToyNDowOSswMDowMFm7FUoAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTctMTAtMDdUMTk6MjQ6MDkrMDA6MDAo5q32AAAAAElFTkSuQmCC --- @@ -29,7 +29,7 @@ metadata: k8s-sidecar-target-directory: /tmp/absolute/ data: change-absolute.txt: |- - This absolutely exists + This absolutely exists --- apiVersion: v1 kind: ConfigMap @@ -41,7 +41,7 @@ metadata: k8s-sidecar-target-directory: relative data: change-relative.txt: |- - This relatively exists + This relatively exists --- apiVersion: v1 kind: ConfigMap @@ -53,4 +53,23 @@ metadata: k8s-sidecar-target-directory: new-dir data: change-dir.txt: |- - This change-dir exists + This change-dir exists +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: similar-configmap-secret + labels: + findme: "yup" +data: + change-similar-configmap.txt: |- + I'm very similar +--- +apiVersion: v1 +kind: Secret +metadata: + name: similar-configmap-secret + labels: + findme: "yup" +data: + change-similar-secret.txt: SSdtIHZlcnkgc2ltaWxhcg== diff --git a/test/resources/resources.yaml b/test/resources/resources.yaml index 5bb4a105..7b683e1f 100644 --- a/test/resources/resources.yaml +++ b/test/resources/resources.yaml @@ -6,7 +6,7 @@ metadata: findme: "yea" data: hello.world: |- - Hello World! + Hello World! binaryData: cm-kubelogo.png: iVBORw0KGgoAAAANSUhEUgAAAUAAAAA5CAYAAABHyvIXAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR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98Up8ocnuU875dlLrL7D4TJkzUBWEFlH+9qH2u2+oZh3HuunqxHSiqMskkPxMmTDQaAQLsmNd+B8IBtuHYD/WvW59LXWV2mwkTJhqVAAG2LUx7Q1GVa1Thg1TfeHF7UtqjZpeZMGEiUohIsH2fOUdjrWXqcMWipke6gipqAar64/aF7b81u8uECRMmTJgwYSIC+H/DglRlbodP6AAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNy0xMC0wN1QxOToyNDowOSswMDowMFm7FUoAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTctMTAtMDdUMTk6MjQ6MDkrMDA6MDAo5q32AAAAAElFTkSuQmCC --- @@ -29,7 +29,7 @@ metadata: k8s-sidecar-target-directory: /tmp/absolute/ data: absolute.txt: |- - This absolutely exists + This absolutely exists --- apiVersion: v1 kind: ConfigMap @@ -41,7 +41,7 @@ metadata: k8s-sidecar-target-directory: relative data: relative.txt: |- - This relatively exists + This relatively exists --- apiVersion: v1 kind: ConfigMap @@ -53,7 +53,26 @@ metadata: k8s-sidecar-target-directory: orig-dir data: change-dir.txt: |- - This change-dir exists + This change-dir exists +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: similar-configmap-secret + labels: + findme: "yup" +data: + similar-configmap.txt: |- + I'm very similar +--- +apiVersion: v1 +kind: Secret +metadata: + name: similar-configmap-secret + labels: + findme: "yup" +data: + similar-secret.txt: SSdtIHZlcnkgc2ltaWxhcg== --- apiVersion: v1 kind: ConfigMap