From e33cf4cca8ac01574e6550ddb381334249ad8c34 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 21 Nov 2023 22:49:54 +0000 Subject: [PATCH 001/104] Changing scope of subdirectory processing, looping through files to handle multiple environment subdirectory scenarios --- .github/workflows/close-pull-request.yaml | 2 +- .github/workflows/new-pull-request.yaml | 125 ++++++++++------------ 2 files changed, 57 insertions(+), 70 deletions(-) diff --git a/.github/workflows/close-pull-request.yaml b/.github/workflows/close-pull-request.yaml index 7bb19568..7d4d610f 100644 --- a/.github/workflows/close-pull-request.yaml +++ b/.github/workflows/close-pull-request.yaml @@ -1,7 +1,7 @@ name: PR Closed - purging developer_branch on: pull_request_target: - branches: [main] + branches: [githubActions] types: [closed] paths-ignore: - 'Validated_Partners/**' diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index a1997303..a8c723f9 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -2,7 +2,7 @@ name: PR Opened - moving new ISV addon to developer_branch for E2E testing on: pull_request_target: - branches: [main] + branches: [githubActions] types: [opened, reopened, synchronize] paths-ignore: - 'Validated_Partners/**' @@ -25,79 +25,66 @@ jobs: # Pull files down into a filename array files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[].filename') echo $files - filearr=($files) - # Find Namespace File in uploads list or in modified file subdirectory - namespace_file=$(echo "$files" | grep "namespace.yaml") - subdirectory=$(dirname ${filearr[0]}) - if [ -z $namespace_file ]; then - git fetch --all - git config --local user.email "dev@null" - git config --local user.name "Conformitron Bot" - git checkout developer_branch - git pull - if [ -f "${subdirectory}/namespace.yaml" ]; then - namespace_file="${subdirectory}/namespace.yaml" - echo "namespace file = $namespace_file" - else - echo "No Namespace file found in existing subdirectory" - exit 200 - fi - elif [[ -n $namespace_file ]]; then - echo "Namespace File: $namespace_file" - else - echo "No Namespace file found in commit or subdirectory" - fi - - # Parse namespace data - namespace_file="${namespace_file}" - if [ -n "$namespace_file" ]; then - subdirectory=$(dirname $namespace_file) - echo "Sub Directory = $subdirectory" - - # get namespace from pr - git checkout pr - namespace_name=$(grep -E '^\s*metadata:\s*$|^\s*name:\s*' "$namespace_file" | awk -F':' '{gsub(/ /, "", $2); print $2}') - - git fetch --all - git config --local user.email "dev@null" - git config --local user.name "Conformitron Bot" - # fetch most recent update to dev - git checkout developer_branch - git pull + # Checkout developer_branch + git fetch --all + git config --local user.email "dev@null" + git config --local user.name "Conformitron Bot" + git checkout developer_branch + git pull - if [[ ! -z $namespace_name ]]; then - echo "$namespace_name" - namespace=$(echo $namespace_name | xargs echo -n) - echo $namespace - config_map_file="config-map-${{ github.event.pull_request.number }}.yml" - echo $config_map_file - echo "apiVersion: v1" >> $config_map_file - echo "kind: ConfigMap" >> $config_map_file - echo "metadata:" >> $config_map_file - echo " name: $namespace-configmap" >> $config_map_file - echo " namespace: $namespace" >> $config_map_file - echo " labels:" >> $config_map_file - echo " bot: conformitron" >> $config_map_file - echo "data:" >> $config_map_file - echo " Namespace: ${namespace}" >> $config_map_file - echo " prNumber: \"${{ github.event.pull_request.number }}\"" >> $config_map_file - echo " commitHash: ${{ github.event.pull_request.head.sha }}" >> $config_map_file - echo $subdirectory - echo $config_map_file + # Find Namespace File(s) in uploads list and generate/update configmap for each + echo $files | while read -r filename ; do + namespace_file=$(echo $filename | grep "namespace.yaml") + + # Parse namespace data + if [ -n "$namespace_file" ]; then + subdirectory=$(dirname $namespace_file) + echo "Sub Directory = $subdirectory" - mkdir -p ./$subdirectory/ - mv "$config_map_file" ./$subdirectory/ - git add . - + # get namespace from pr + git checkout pr + namespace_name=$(grep -E '^\s*metadata:\s*$|^\s*name:\s*' "$namespace_file" | awk -F':' '{gsub(/ /, "", $2); print $2}') + + git fetch --all + git config --local user.email "dev@null" + git config --local user.name "Conformitron Bot" + # fetch most recent update to dev + git checkout developer_branch + git pull + + if [[ ! -z $namespace_name ]]; then + echo "$namespace_name" + namespace=$(echo $namespace_name | xargs echo -n) + echo $namespace + config_map_file="config-map-${{ github.event.pull_request.number }}.yml" + echo $config_map_file + echo "apiVersion: v1" >> $config_map_file + echo "kind: ConfigMap" >> $config_map_file + echo "metadata:" >> $config_map_file + echo " name: $namespace-configmap" >> $config_map_file + echo " namespace: $namespace" >> $config_map_file + echo " labels:" >> $config_map_file + echo " bot: conformitron" >> $config_map_file + echo "data:" >> $config_map_file + echo " Namespace: ${namespace}" >> $config_map_file + echo " prNumber: \"${{ github.event.pull_request.number }}\"" >> $config_map_file + echo " commitHash: ${{ github.event.pull_request.head.sha }}" >> $config_map_file + echo $subdirectory + echo $config_map_file + + mkdir -p ./$subdirectory/ + mv "$config_map_file" ./$subdirectory/ + git add . + + else + echo "No Namespace found" + exit 100 + fi else - echo "No Namespace found" - exit 100 + echo "Not a namespace.yaml file" fi - else - echo "No namespace.yaml file found" - exit 200 - fi + done # Move updated files over for item in $files; do From 4fa566be79b172c4d36e0898d5a5dbd67f897b5d Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 21 Nov 2023 23:14:40 +0000 Subject: [PATCH 002/104] file handing logic --- .github/workflows/new-pull-request.yaml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index a8c723f9..85054f35 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -35,6 +35,7 @@ jobs: # Find Namespace File(s) in uploads list and generate/update configmap for each echo $files | while read -r filename ; do + echo "Filename = $filename" namespace_file=$(echo $filename | grep "namespace.yaml") # Parse namespace data @@ -42,16 +43,8 @@ jobs: subdirectory=$(dirname $namespace_file) echo "Sub Directory = $subdirectory" - # get namespace from pr - git checkout pr + # get namespace variable namespace_name=$(grep -E '^\s*metadata:\s*$|^\s*name:\s*' "$namespace_file" | awk -F':' '{gsub(/ /, "", $2); print $2}') - - git fetch --all - git config --local user.email "dev@null" - git config --local user.name "Conformitron Bot" - # fetch most recent update to dev - git checkout developer_branch - git pull if [[ ! -z $namespace_name ]]; then echo "$namespace_name" From b2d0b8f4c25c819e24d96dc61df0180308fc1f82 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 21 Nov 2023 23:17:29 +0000 Subject: [PATCH 003/104] reinstate filearr --- .github/workflows/new-pull-request.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 85054f35..7177b3fb 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,6 +25,7 @@ jobs: # Pull files down into a filename array files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[].filename') echo $files + filearr=($files) # Checkout developer_branch git fetch --all @@ -34,7 +35,7 @@ jobs: git pull # Find Namespace File(s) in uploads list and generate/update configmap for each - echo $files | while read -r filename ; do + echo $filearr | while read -r filename ; do echo "Filename = $filename" namespace_file=$(echo $filename | grep "namespace.yaml") From d9f333612dccf1ee60a34740571a7212adf094ee Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 21 Nov 2023 23:26:57 +0000 Subject: [PATCH 004/104] reinstate pr checkout for namespace --- .github/workflows/new-pull-request.yaml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 7177b3fb..0e686690 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -27,13 +27,6 @@ jobs: echo $files filearr=($files) - # Checkout developer_branch - git fetch --all - git config --local user.email "dev@null" - git config --local user.name "Conformitron Bot" - git checkout developer_branch - git pull - # Find Namespace File(s) in uploads list and generate/update configmap for each echo $filearr | while read -r filename ; do echo "Filename = $filename" @@ -44,9 +37,17 @@ jobs: subdirectory=$(dirname $namespace_file) echo "Sub Directory = $subdirectory" - # get namespace variable + # get namespace from pr + git checkout pr namespace_name=$(grep -E '^\s*metadata:\s*$|^\s*name:\s*' "$namespace_file" | awk -F':' '{gsub(/ /, "", $2); print $2}') - + + git fetch --all + git config --local user.email "dev@null" + git config --local user.name "Conformitron Bot" + # fetch most recent update to dev + git checkout developer_branch + git pull + if [[ ! -z $namespace_name ]]; then echo "$namespace_name" namespace=$(echo $namespace_name | xargs echo -n) From b110a35967dd54e7376748804e1ba5e38a1eef05 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 21 Nov 2023 23:49:12 +0000 Subject: [PATCH 005/104] adjusting loop properties --- .github/workflows/new-pull-request.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 0e686690..d7d7ffed 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -28,7 +28,8 @@ jobs: filearr=($files) # Find Namespace File(s) in uploads list and generate/update configmap for each - echo $filearr | while read -r filename ; do + for filename in filearr + do echo "Filename = $filename" namespace_file=$(echo $filename | grep "namespace.yaml") @@ -87,5 +88,5 @@ jobs: git add $item echo $item done - git commit -m "Adding new and changed files for ${namespace}_PR_${{ github.event.pull_request.number }}" + git commit -m "Adding new and changed files for ${namespace}PR_${{ github.event.pull_request.number }}" git push From 453091d426fba8017f69a86e8c15461626b47064 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 21 Nov 2023 23:50:50 +0000 Subject: [PATCH 006/104] adjusting loop properties 2 --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index d7d7ffed..db238f1d 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -28,7 +28,7 @@ jobs: filearr=($files) # Find Namespace File(s) in uploads list and generate/update configmap for each - for filename in filearr + for filename in $filearr do echo "Filename = $filename" namespace_file=$(echo $filename | grep "namespace.yaml") From 1773dac12eddd7a0e5663c61e50e15f5a85008d9 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 21 Nov 2023 23:58:29 +0000 Subject: [PATCH 007/104] adjusting loop properties 3 --- .github/workflows/new-pull-request.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index db238f1d..279921b4 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -24,11 +24,11 @@ jobs: run: | # Pull files down into a filename array files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[].filename') - echo $files - filearr=($files) + # echo $files + # filearr=($files) # Find Namespace File(s) in uploads list and generate/update configmap for each - for filename in $filearr + for filename in $files do echo "Filename = $filename" namespace_file=$(echo $filename | grep "namespace.yaml") @@ -86,7 +86,7 @@ jobs: for item in $files; do git checkout pr -- $item git add $item - echo $item + echo "Moving $item" done git commit -m "Adding new and changed files for ${namespace}PR_${{ github.event.pull_request.number }}" git push From c422393d49da3c12e516a4a16532b4b933436aea Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Mon, 27 Nov 2023 18:16:48 +0000 Subject: [PATCH 008/104] Updated IF logic --- .github/workflows/new-pull-request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 279921b4..3f9ce7a8 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -34,7 +34,7 @@ jobs: namespace_file=$(echo $filename | grep "namespace.yaml") # Parse namespace data - if [ -n "$namespace_file" ]; then + if [ -n $namespace_file ]; then subdirectory=$(dirname $namespace_file) echo "Sub Directory = $subdirectory" @@ -49,7 +49,7 @@ jobs: git checkout developer_branch git pull - if [[ ! -z $namespace_name ]]; then + if [[ -n $namespace_name ]]; then echo "$namespace_name" namespace=$(echo $namespace_name | xargs echo -n) echo $namespace From 2794ddd1eea991f5026e8d4ee194fee17aa6bb3a Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Mon, 27 Nov 2023 18:29:05 +0000 Subject: [PATCH 009/104] Updated namespace file checking --- .github/workflows/new-pull-request.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 3f9ce7a8..c6ee440c 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -31,16 +31,15 @@ jobs: for filename in $files do echo "Filename = $filename" - namespace_file=$(echo $filename | grep "namespace.yaml") # Parse namespace data - if [ -n $namespace_file ]; then - subdirectory=$(dirname $namespace_file) + if [ echo $filename | grep -c "namespace.yaml" ]; then + subdirectory=$(dirname $filename) echo "Sub Directory = $subdirectory" # get namespace from pr git checkout pr - namespace_name=$(grep -E '^\s*metadata:\s*$|^\s*name:\s*' "$namespace_file" | awk -F':' '{gsub(/ /, "", $2); print $2}') + namespace_name=$(grep -E '^\s*metadata:\s*$|^\s*name:\s*' "$filename" | awk -F':' '{gsub(/ /, "", $2); print $2}') git fetch --all git config --local user.email "dev@null" From 2924457672b5a5b1e7c0c73fd91157163f1b98f7 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Mon, 27 Nov 2023 18:40:09 +0000 Subject: [PATCH 010/104] Updated if logic --- .github/workflows/new-pull-request.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index c6ee440c..a8f3ea8c 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -33,7 +33,7 @@ jobs: echo "Filename = $filename" # Parse namespace data - if [ echo $filename | grep -c "namespace.yaml" ]; then + if [ $(echo "$filename" | grep -c "namespace.yaml") ]; then subdirectory=$(dirname $filename) echo "Sub Directory = $subdirectory" @@ -82,6 +82,13 @@ jobs: done # Move updated files over + git fetch --all + git config --local user.email "dev@null" + git config --local user.name "Conformitron Bot" + # fetch most recent update to dev + git checkout developer_branch + git pull + for item in $files; do git checkout pr -- $item git add $item From 89ef6015f969df54b71d00717640f65ad88a20cf Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Mon, 27 Nov 2023 19:16:54 +0000 Subject: [PATCH 011/104] Re-order file movement logic, perform configMap generation and NS file check after file move --- .github/workflows/new-pull-request.yaml | 54 +++++++++++++------------ 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index a8f3ea8c..cb4e1eba 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -24,8 +24,21 @@ jobs: run: | # Pull files down into a filename array files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[].filename') - # echo $files - # filearr=($files) + + # Move updated files over to dev branch + git fetch --all + git config --local user.email "dev@null" + git config --local user.name "Conformitron Bot" + # fetch most recent update to dev + git checkout developer_branch + git pull + + for item in $files; do + git checkout pr -- $item + git add $item + echo "Moving $item" + done + # Find Namespace File(s) in uploads list and generate/update configmap for each for filename in $files @@ -37,16 +50,18 @@ jobs: subdirectory=$(dirname $filename) echo "Sub Directory = $subdirectory" - # get namespace from pr - git checkout pr - namespace_name=$(grep -E '^\s*metadata:\s*$|^\s*name:\s*' "$filename" | awk -F':' '{gsub(/ /, "", $2); print $2}') - git fetch --all - git config --local user.email "dev@null" - git config --local user.name "Conformitron Bot" - # fetch most recent update to dev - git checkout developer_branch - git pull + + # get namespace from dev branch directory where the updated file is being placed + if [ -f "${subdirectory}/namespace.yaml" ]; then + namespace_file="${subdirectory}/namespace.yaml" + echo "namespace file = $namespace_file" + namespace_name=$(grep -E '^\s*metadata:\s*$|^\s*name:\s*' "$namespace_file" | awk -F':' '{gsub(/ /, "", $2); print $2}') + else + echo "No Namespace file found in existing subdirectory" + exit 200 + fi + if [[ -n $namespace_name ]]; then echo "$namespace_name" @@ -73,7 +88,7 @@ jobs: git add . else - echo "No Namespace found" + echo "No Namespace found, Invalid namespace file" exit 100 fi else @@ -81,18 +96,5 @@ jobs: fi done - # Move updated files over - git fetch --all - git config --local user.email "dev@null" - git config --local user.name "Conformitron Bot" - # fetch most recent update to dev - git checkout developer_branch - git pull - - for item in $files; do - git checkout pr -- $item - git add $item - echo "Moving $item" - done - git commit -m "Adding new and changed files for ${namespace}PR_${{ github.event.pull_request.number }}" + git commit -m "Adding new and changed files for PR_${{ github.event.pull_request.number }}" git push From cc35a31d196183e0d00bea8dcafe0790bd6e5678 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Wed, 29 Nov 2023 21:54:20 +0000 Subject: [PATCH 012/104] Updating target branch back to main in preparation for PR --- .github/workflows/new-pull-request.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index cb4e1eba..db69cad7 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -2,7 +2,7 @@ name: PR Opened - moving new ISV addon to developer_branch for E2E testing on: pull_request_target: - branches: [githubActions] + branches: [main] types: [opened, reopened, synchronize] paths-ignore: - 'Validated_Partners/**' @@ -39,7 +39,6 @@ jobs: echo "Moving $item" done - # Find Namespace File(s) in uploads list and generate/update configmap for each for filename in $files do @@ -50,8 +49,6 @@ jobs: subdirectory=$(dirname $filename) echo "Sub Directory = $subdirectory" - - # get namespace from dev branch directory where the updated file is being placed if [ -f "${subdirectory}/namespace.yaml" ]; then namespace_file="${subdirectory}/namespace.yaml" @@ -62,7 +59,6 @@ jobs: exit 200 fi - if [[ -n $namespace_name ]]; then echo "$namespace_name" namespace=$(echo $namespace_name | xargs echo -n) From c07929e7ad3417eb25ce789d1a052c7aff7044db Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 20:22:43 +0000 Subject: [PATCH 013/104] Sync to main branch --- .github/workflows/close-pull-request.yaml | 2 +- .github/workflows/new-pull-request.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/close-pull-request.yaml b/.github/workflows/close-pull-request.yaml index 7d4d610f..7bb19568 100644 --- a/.github/workflows/close-pull-request.yaml +++ b/.github/workflows/close-pull-request.yaml @@ -1,7 +1,7 @@ name: PR Closed - purging developer_branch on: pull_request_target: - branches: [githubActions] + branches: [main] types: [closed] paths-ignore: - 'Validated_Partners/**' diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index db69cad7..fa0ca98d 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -7,6 +7,8 @@ on: paths-ignore: - 'Validated_Partners/**' - '.github/**' + - 'docs' + - '.git' jobs: build: @@ -76,6 +78,8 @@ jobs: echo " Namespace: ${namespace}" >> $config_map_file echo " prNumber: \"${{ github.event.pull_request.number }}\"" >> $config_map_file echo " commitHash: ${{ github.event.pull_request.head.sha }}" >> $config_map_file + echo " deployed: \"$(date +%s)\"" >> $config_map_file + echo " env: $(echo $subdirectory | cut -f1 -d/ | awk -F- '{print $NF}' )" >> $config_map_file echo $subdirectory echo $config_map_file From cdccc55c40d53bc0e903a6f87577c39a0cedf46f Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 20:31:59 +0000 Subject: [PATCH 014/104] Setting branch to Githubactions for testing --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index fa0ca98d..931255c0 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -2,7 +2,7 @@ name: PR Opened - moving new ISV addon to developer_branch for E2E testing on: pull_request_target: - branches: [main] + branches: [githubActions] types: [opened, reopened, synchronize] paths-ignore: - 'Validated_Partners/**' From bc4d0b271db7c8b4772dfc9e308521e4a185e6a9 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 22:59:16 +0000 Subject: [PATCH 015/104] File Status check --- .github/workflows/new-pull-request.yaml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 931255c0..9b243e63 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,9 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[].filename') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files") + + echo $files # Move updated files over to dev branch git fetch --all @@ -36,14 +38,20 @@ jobs: git pull for item in $files; do - git checkout pr -- $item - git add $item - echo "Moving $item" + if [$item.status != deleted]; then + git checkout pr -- $item.filename + git add $item.filename + echo "Moving $item.filename" + else + echo "Deleting $item.filename" + rm $item + fi done # Find Namespace File(s) in uploads list and generate/update configmap for each - for filename in $files + for file in $files [LEFT OFF HERE] do + filename=$file.filename echo "Filename = $filename" # Parse namespace data From 8ff9c65484c3a386c176ea932a598188683f2e13 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 23:01:38 +0000 Subject: [PATCH 016/104] File Array --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 9b243e63..608bb295 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files") + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[]') echo $files From ac314d69bd222bc34d9bc5937c85127d8405e6ad Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 23:06:52 +0000 Subject: [PATCH 017/104] Parsing status and filename --- .github/workflows/new-pull-request.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 608bb295..46fd4572 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files") echo $files @@ -38,7 +38,12 @@ jobs: git pull for item in $files; do - if [$item.status != deleted]; then + status= $(echo $item | jq -r '.[].status') + filename=status= $(echo $item | jq -r '.[].filename') + echo "Filename: $filename is Status: $status" + + + if [ $item.status != deleted ]; then git checkout pr -- $item.filename git add $item.filename echo "Moving $item.filename" From 973afcc06e81cf24339725f8b74a32eb9cbbb443 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 23:11:03 +0000 Subject: [PATCH 018/104] Parsing status and filename --- .github/workflows/new-pull-request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 46fd4572..812a3bbb 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -38,8 +38,8 @@ jobs: git pull for item in $files; do - status= $(echo $item | jq -r '.[].status') - filename=status= $(echo $item | jq -r '.[].filename') + status=$(echo $item | jq -r '.[].status') + filename=$(echo $item | jq -r '.[].filename') echo "Filename: $filename is Status: $status" From 3c1b81ff213c3ef981b4931c7f3aaa4b4750eafb Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 23:13:17 +0000 Subject: [PATCH 019/104] Parse troubleshooting --- .github/workflows/new-pull-request.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 812a3bbb..3f91ea67 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -27,8 +27,6 @@ jobs: # Pull files down into a filename array files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files") - echo $files - # Move updated files over to dev branch git fetch --all git config --local user.email "dev@null" @@ -38,18 +36,19 @@ jobs: git pull for item in $files; do + echo "$item" status=$(echo $item | jq -r '.[].status') filename=$(echo $item | jq -r '.[].filename') echo "Filename: $filename is Status: $status" - if [ $item.status != deleted ]; then - git checkout pr -- $item.filename - git add $item.filename - echo "Moving $item.filename" + if [ status != deleted ]; then + git checkout pr -- $filename + git add $filename + echo "Moving $filename" else - echo "Deleting $item.filename" - rm $item + echo "Deleting $filename" + rm $filename fi done From 2be48b875d228c5cb9236604a572ca491bad70e2 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 23:17:24 +0000 Subject: [PATCH 020/104] Parse troubleshooting 2 --- .github/workflows/new-pull-request.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 3f91ea67..a624b19f 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files") + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"| jq -r '.[]') # Move updated files over to dev branch git fetch --all @@ -37,8 +37,8 @@ jobs: for item in $files; do echo "$item" - status=$(echo $item | jq -r '.[].status') - filename=$(echo $item | jq -r '.[].filename') + status=$(echo $item | jq -r '.status') + filename=$(echo $item | jq -r '.filename') echo "Filename: $filename is Status: $status" From c9c9e4a569a31a7c4fd1c2c672434d6857876b76 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 23:22:41 +0000 Subject: [PATCH 021/104] jq formatting --- .github/workflows/new-pull-request.yaml | 2 +- blob.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 blob.txt diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index a624b19f..01f519b1 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"| jq -r '.[]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq '.[]') # Move updated files over to dev branch git fetch --all diff --git a/blob.txt b/blob.txt new file mode 100644 index 00000000..5f222192 --- /dev/null +++ b/blob.txt @@ -0,0 +1 @@ +[ { "sha": "58dee1e2fdec28d85d5c4fbb1effc0f57a569e3c", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/openebs/helm-release.yaml", "status": "removed", "additions": 0, "deletions": 19, "changes": 19, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/132b6f3f37b1e19a19b5293e8e27f2aebe814727/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fhelm-release.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/132b6f3f37b1e19a19b5293e8e27f2aebe814727/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fhelm-release.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fhelm-release.yaml?ref=132b6f3f37b1e19a19b5293e8e27f2aebe814727", "patch": "@@ -1,19 +0,0 @@\n----\n-apiVersion: helm.toolkit.fluxcd.io/v2beta1\n-kind: HelmRelease\n-metadata:\n- name: openebs\n- namespace: openebs\n-spec:\n- chart:\n- spec:\n- chart: openebs\n- reconcileStrategy: ChartVersion\n- sourceRef:\n- kind: HelmRepository\n- name: openebs\n- namespace: openebs\n- version: \"3.3.0\"\n- interval: 60s\n- targetNamespace: openebs\n- " }, { "sha": "d9665841e64ad0da69035d1a59f70ea5188f73ac", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/openebs/helm-repo.yaml", "status": "removed", "additions": 0, "deletions": 10, "changes": 10, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/132b6f3f37b1e19a19b5293e8e27f2aebe814727/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fhelm-repo.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/132b6f3f37b1e19a19b5293e8e27f2aebe814727/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fhelm-repo.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fhelm-repo.yaml?ref=132b6f3f37b1e19a19b5293e8e27f2aebe814727", "patch": "@@ -1,10 +0,0 @@\n----\n-apiVersion: source.toolkit.fluxcd.io/v1beta2\n-kind: HelmRepository\n-metadata:\n- name: openebs\n- namespace: openebs\n-spec:\n- interval: 30s\n- url: https://openebs.github.io/charts\n-" }, { "sha": "de9f0a8449e1f7ecfb331a60afc362319e7d5bb5", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/openebs/kustomization.yaml", "status": "removed", "additions": 0, "deletions": 6, "changes": 6, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/132b6f3f37b1e19a19b5293e8e27f2aebe814727/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fkustomization.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/132b6f3f37b1e19a19b5293e8e27f2aebe814727/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fkustomization.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fkustomization.yaml?ref=132b6f3f37b1e19a19b5293e8e27f2aebe814727", "patch": "@@ -1,6 +0,0 @@\n-apiVersion: kustomize.config.k8s.io/v1beta1\n-kind: Kustomization\n-resources:\n- - namespace.yaml\n- - helm-repo.yaml\n- - helm-release.yaml\n\\ No newline at end of file" }, { "sha": "df0cd2432ec58a46ad91c81440e4c6c5b5e0cccd", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/storage-driver.yaml", "status": "modified", "additions": 2, "deletions": 2, "changes": 4, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fstorage-driver.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fstorage-driver.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fstorage-driver.yaml?ref=919469f6ec8827550101162b3710347d1ee8a735", "patch": "@@ -1,10 +1,10 @@\n apiVersion: kustomize.toolkit.fluxcd.io/v1beta2\n kind: Kustomization\n metadata:\n- name: openebs\n+ name: vmware-csi\n namespace: flux-system\n spec:\n- path: \"./eks-anywhere-vsphere/Addons/Core/storage-driver/openebs\"\n+ path: \"./eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi\"\n sourceRef:\n kind: GitRepository\n name: addons" }, { "sha": "c9bbb152079b0cc5c336ac58bb0275f99f7598f3", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/kustomization.yaml", "status": "added", "additions": 8, "deletions": 0, "changes": 8, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fkustomization.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fkustomization.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fkustomization.yaml?ref=919469f6ec8827550101162b3710347d1ee8a735", "patch": "@@ -0,0 +1,8 @@\n+apiVersion: kustomize.config.k8s.io/v1beta1\n+kind: Kustomization\n+resources:\n+ - namespace.yaml\n+ - vsphere-cloud-controller-manager.yaml\n+ - vsphere-csi-externalsecrets.yaml\n+ - vsphere-csi-driver.yaml\n+ - vmware-sc.yaml\n\\ No newline at end of file" }, { "sha": "f6b4f38be04e8eaddc66820e904bd264357fa6dc", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/namespace.yaml", "status": "renamed", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fnamespace.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fnamespace.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fnamespace.yaml?ref=919469f6ec8827550101162b3710347d1ee8a735", "patch": "@@ -1,4 +1,4 @@\n apiVersion: v1\n kind: Namespace\n metadata:\n- name: openebs\n\\ No newline at end of file\n+ name: vmware-system-csi\n\\ No newline at end of file", "previous_filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/openebs/namespace.yaml" }, { "sha": "14b2898cab6c32a63c95255bcc5c2ea1f03c4967", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/vmware-sc.yaml", "status": "added", "additions": 7, "deletions": 0, "changes": 7, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvmware-sc.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvmware-sc.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvmware-sc.yaml?ref=919469f6ec8827550101162b3710347d1ee8a735", "patch": "@@ -0,0 +1,7 @@\n+kind: StorageClass\n+apiVersion: storage.k8s.io/v1\n+metadata:\n+ name: vmware-sc\n+ annotations:\n+ storageclass.kubernetes.io/is-default-class: \"true\"\n+provisioner: csi.vsphere.vmware.com\n\\ No newline at end of file" }, { "sha": "22880a6eac1e778d6743d587855d3f25331c54e9", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/vsphere-cloud-controller-manager.yaml", "status": "added", "additions": 207, "deletions": 0, "changes": 207, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-cloud-controller-manager.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-cloud-controller-manager.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-cloud-controller-manager.yaml?ref=919469f6ec8827550101162b3710347d1ee8a735", "patch": "@@ -0,0 +1,207 @@\n+---\n+apiVersion: v1\n+kind: ServiceAccount\n+metadata:\n+ name: cloud-controller-manager\n+ labels:\n+ vsphere-cpi-infra: service-account\n+ component: cloud-controller-manager\n+ namespace: kube-system\n+---\n+apiVersion: rbac.authorization.k8s.io/v1\n+kind: RoleBinding\n+metadata:\n+ name: servicecatalog.k8s.io:apiserver-authentication-reader\n+ labels:\n+ vsphere-cpi-infra: role-binding\n+ component: cloud-controller-manager\n+ namespace: kube-system\n+roleRef:\n+ apiGroup: rbac.authorization.k8s.io\n+ kind: Role\n+ name: extension-apiserver-authentication-reader\n+subjects:\n+ - apiGroup: \"\"\n+ kind: ServiceAccount\n+ name: cloud-controller-manager\n+ namespace: kube-system\n+ - apiGroup: \"\"\n+ kind: User\n+ name: cloud-controller-manager\n+---\n+apiVersion: rbac.authorization.k8s.io/v1\n+kind: ClusterRoleBinding\n+metadata:\n+ name: system:cloud-controller-manager\n+ labels:\n+ vsphere-cpi-infra: cluster-role-binding\n+ component: cloud-controller-manager\n+roleRef:\n+ apiGroup: rbac.authorization.k8s.io\n+ kind: ClusterRole\n+ name: system:cloud-controller-manager\n+subjects:\n+ - kind: ServiceAccount\n+ name: cloud-controller-manager\n+ namespace: kube-system\n+ - kind: User\n+ name: cloud-controller-manager\n+---\n+apiVersion: rbac.authorization.k8s.io/v1\n+kind: ClusterRole\n+metadata:\n+ name: system:cloud-controller-manager\n+ labels:\n+ vsphere-cpi-infra: role\n+ component: cloud-controller-manager\n+rules:\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - events\n+ verbs:\n+ - create\n+ - patch\n+ - update\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - nodes\n+ verbs:\n+ - \"*\"\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - nodes/status\n+ verbs:\n+ - patch\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - services\n+ verbs:\n+ - list\n+ - patch\n+ - update\n+ - watch\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - services/status\n+ verbs:\n+ - patch\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - serviceaccounts\n+ verbs:\n+ - create\n+ - get\n+ - list\n+ - watch\n+ - update\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - persistentvolumes\n+ verbs:\n+ - get\n+ - list\n+ - update\n+ - watch\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - endpoints\n+ verbs:\n+ - create\n+ - get\n+ - list\n+ - watch\n+ - update\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - secrets\n+ verbs:\n+ - get\n+ - list\n+ - watch\n+ - apiGroups:\n+ - \"coordination.k8s.io\"\n+ resources:\n+ - leases\n+ verbs:\n+ - create\n+ - get\n+ - list\n+ - watch\n+ - update\n+---\n+apiVersion: apps/v1\n+kind: DaemonSet\n+metadata:\n+ name: vsphere-cloud-controller-manager\n+ labels:\n+ component: cloud-controller-manager\n+ tier: control-plane\n+ namespace: kube-system\n+spec:\n+ selector:\n+ matchLabels:\n+ name: vsphere-cloud-controller-manager\n+ updateStrategy:\n+ type: RollingUpdate\n+ template:\n+ metadata:\n+ labels:\n+ name: vsphere-cloud-controller-manager\n+ component: cloud-controller-manager\n+ tier: control-plane\n+ spec:\n+ tolerations:\n+ - key: node.cloudprovider.kubernetes.io/uninitialized\n+ value: \"true\"\n+ effect: NoSchedule\n+ - key: node-role.kubernetes.io/master\n+ effect: NoSchedule\n+ operator: Exists\n+ - key: node-role.kubernetes.io/control-plane\n+ effect: NoSchedule\n+ operator: Exists\n+ - key: node.kubernetes.io/not-ready\n+ effect: NoSchedule\n+ operator: Exists\n+ securityContext:\n+ runAsUser: 1001\n+ serviceAccountName: cloud-controller-manager\n+ priorityClassName: system-node-critical\n+ containers:\n+ - name: vsphere-cloud-controller-manager\n+ image: gcr.io/cloud-provider-vsphere/cpi/release/manager:v1.28.0\n+ args:\n+ - --cloud-provider=vsphere\n+ - --v=2\n+ - --cloud-config=/etc/cloud/vsphere.conf\n+ volumeMounts:\n+ - mountPath: /etc/cloud\n+ name: vsphere-config-volume\n+ readOnly: true\n+ resources:\n+ requests:\n+ cpu: 200m\n+ hostNetwork: true\n+ volumes:\n+ - name: vsphere-config-volume\n+ secret:\n+ secretName: vsphere.conf\n+ affinity:\n+ nodeAffinity:\n+ requiredDuringSchedulingIgnoredDuringExecution:\n+ nodeSelectorTerms:\n+ - matchExpressions:\n+ - key: node-role.kubernetes.io/control-plane\n+ operator: Exists\n+ - matchExpressions:\n+ - key: node-role.kubernetes.io/master\n+ operator: Exists" }, { "sha": "44df966127dae65d97e92c2db484da62c5995333", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/vsphere-csi-driver.yaml", "status": "added", "additions": 715, "deletions": 0, "changes": 715, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-csi-driver.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-csi-driver.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-csi-driver.yaml?ref=919469f6ec8827550101162b3710347d1ee8a735", "patch": "@@ -0,0 +1,715 @@\n+apiVersion: storage.k8s.io/v1\n+kind: CSIDriver\n+metadata:\n+ name: csi.vsphere.vmware.com\n+spec:\n+ attachRequired: true\n+ podInfoOnMount: false\n+---\n+kind: ServiceAccount\n+apiVersion: v1\n+metadata:\n+ name: vsphere-csi-controller\n+ namespace: vmware-system-csi\n+---\n+kind: ClusterRole\n+apiVersion: rbac.authorization.k8s.io/v1\n+metadata:\n+ name: vsphere-csi-controller-role\n+rules:\n+ - apiGroups: [\"\"]\n+ resources: [\"nodes\", \"pods\"]\n+ verbs: [\"get\", \"list\", \"watch\"]\n+ - apiGroups: [\"\"]\n+ resources: [\"configmaps\"]\n+ verbs: [\"get\", \"list\", \"watch\", \"create\"]\n+ - apiGroups: [\"\"]\n+ resources: [\"persistentvolumeclaims\"]\n+ verbs: [\"get\", \"list\", \"watch\", \"update\"]\n+ - apiGroups: [\"\"]\n+ resources: [\"persistentvolumeclaims/status\"]\n+ verbs: [\"patch\"]\n+ - apiGroups: [\"\"]\n+ resources: [\"persistentvolumes\"]\n+ verbs: [\"get\", \"list\", \"watch\", \"create\", \"update\", \"delete\", \"patch\"]\n+ - apiGroups: [\"\"]\n+ resources: [\"events\"]\n+ verbs: [\"get\", \"list\", \"watch\", \"create\", \"update\", \"patch\"]\n+ - apiGroups: [\"coordination.k8s.io\"]\n+ resources: [\"leases\"]\n+ verbs: [\"get\", \"watch\", \"list\", \"delete\", \"update\", \"create\"]\n+ - apiGroups: [\"storage.k8s.io\"]\n+ resources: [\"storageclasses\", \"csinodes\"]\n+ verbs: [\"get\", \"list\", \"watch\"]\n+ - apiGroups: [\"storage.k8s.io\"]\n+ resources: [\"volumeattachments\"]\n+ verbs: [\"get\", \"list\", \"watch\", \"patch\"]\n+ - apiGroups: [\"cns.vmware.com\"]\n+ resources: [\"triggercsifullsyncs\"]\n+ verbs: [\"create\", \"get\", \"update\", \"watch\", \"list\"]\n+ - apiGroups: [\"cns.vmware.com\"]\n+ resources: [\"cnsvspherevolumemigrations\"]\n+ verbs: [\"create\", \"get\", \"list\", \"watch\", \"update\", \"delete\"]\n+ - apiGroups: [\"cns.vmware.com\"]\n+ resources: [\"cnsvolumeinfoes\"]\n+ verbs: [\"create\", \"get\", \"list\", \"watch\", \"delete\"]\n+ - apiGroups: [\"apiextensions.k8s.io\"]\n+ resources: [\"customresourcedefinitions\"]\n+ verbs: [\"get\", \"create\", \"update\"]\n+ - apiGroups: [\"storage.k8s.io\"]\n+ resources: [\"volumeattachments/status\"]\n+ verbs: [\"patch\"]\n+ - apiGroups: [\"cns.vmware.com\"]\n+ resources: [\"cnsvolumeoperationrequests\"]\n+ verbs: [\"create\", \"get\", \"list\", \"update\", \"delete\"]\n+ - apiGroups: [ \"snapshot.storage.k8s.io\" ]\n+ resources: [ \"volumesnapshots\" ]\n+ verbs: [ \"get\", \"list\" ]\n+ - apiGroups: [ \"snapshot.storage.k8s.io\" ]\n+ resources: [ \"volumesnapshotclasses\" ]\n+ verbs: [ \"watch\", \"get\", \"list\" ]\n+ - apiGroups: [ \"snapshot.storage.k8s.io\" ]\n+ resources: [ \"volumesnapshotcontents\" ]\n+ verbs: [ \"create\", \"get\", \"list\", \"watch\", \"update\", \"delete\", \"patch\"]\n+ - apiGroups: [ \"snapshot.storage.k8s.io\" ]\n+ resources: [ \"volumesnapshotcontents/status\" ]\n+ verbs: [ \"update\", \"patch\" ]\n+ - apiGroups: [ \"cns.vmware.com\" ]\n+ resources: [ \"csinodetopologies\" ]\n+ verbs: [\"get\", \"update\", \"watch\", \"list\"]\n+---\n+kind: ClusterRoleBinding\n+apiVersion: rbac.authorization.k8s.io/v1\n+metadata:\n+ name: vsphere-csi-controller-binding\n+subjects:\n+ - kind: ServiceAccount\n+ name: vsphere-csi-controller\n+ namespace: vmware-system-csi\n+roleRef:\n+ kind: ClusterRole\n+ name: vsphere-csi-controller-role\n+ apiGroup: rbac.authorization.k8s.io\n+---\n+kind: ServiceAccount\n+apiVersion: v1\n+metadata:\n+ name: vsphere-csi-node\n+ namespace: vmware-system-csi\n+---\n+kind: ClusterRole\n+apiVersion: rbac.authorization.k8s.io/v1\n+metadata:\n+ name: vsphere-csi-node-cluster-role\n+rules:\n+ - apiGroups: [\"cns.vmware.com\"]\n+ resources: [\"csinodetopologies\"]\n+ verbs: [\"create\", \"watch\", \"get\", \"patch\"]\n+ - apiGroups: [\"\"]\n+ resources: [\"nodes\"]\n+ verbs: [\"get\"]\n+---\n+kind: ClusterRoleBinding\n+apiVersion: rbac.authorization.k8s.io/v1\n+metadata:\n+ name: vsphere-csi-node-cluster-role-binding\n+subjects:\n+ - kind: ServiceAccount\n+ name: vsphere-csi-node\n+ namespace: vmware-system-csi\n+roleRef:\n+ kind: ClusterRole\n+ name: vsphere-csi-node-cluster-role\n+ apiGroup: rbac.authorization.k8s.io\n+---\n+kind: Role\n+apiVersion: rbac.authorization.k8s.io/v1\n+metadata:\n+ name: vsphere-csi-node-role\n+ namespace: vmware-system-csi\n+rules:\n+ - apiGroups: [\"\"]\n+ resources: [\"configmaps\"]\n+ verbs: [\"get\", \"list\", \"watch\"]\n+---\n+kind: RoleBinding\n+apiVersion: rbac.authorization.k8s.io/v1\n+metadata:\n+ name: vsphere-csi-node-binding\n+ namespace: vmware-system-csi\n+subjects:\n+ - kind: ServiceAccount\n+ name: vsphere-csi-node\n+ namespace: vmware-system-csi\n+roleRef:\n+ kind: Role\n+ name: vsphere-csi-node-role\n+ apiGroup: rbac.authorization.k8s.io\n+---\n+apiVersion: v1\n+data:\n+ \"csi-migration\": \"true\"\n+ \"csi-auth-check\": \"true\"\n+ \"online-volume-extend\": \"true\"\n+ \"trigger-csi-fullsync\": \"false\"\n+ \"async-query-volume\": \"true\"\n+ \"block-volume-snapshot\": \"true\"\n+ \"csi-windows-support\": \"true\"\n+ \"use-csinode-id\": \"true\"\n+ \"list-volumes\": \"true\"\n+ \"pv-to-backingdiskobjectid-mapping\": \"false\"\n+ \"cnsmgr-suspend-create-volume\": \"true\"\n+ \"topology-preferential-datastores\": \"true\"\n+ \"max-pvscsi-targets-per-vm\": \"true\"\n+ \"multi-vcenter-csi-topology\": \"true\"\n+ \"csi-internal-generated-cluster-id\": \"true\"\n+ \"listview-tasks\": \"false\"\n+kind: ConfigMap\n+metadata:\n+ name: internal-feature-states.csi.vsphere.vmware.com\n+ namespace: vmware-system-csi\n+---\n+apiVersion: v1\n+kind: Service\n+metadata:\n+ name: vsphere-csi-controller\n+ namespace: vmware-system-csi\n+ labels:\n+ app: vsphere-csi-controller\n+spec:\n+ ports:\n+ - name: ctlr\n+ port: 2112\n+ targetPort: 2112\n+ protocol: TCP\n+ - name: syncer\n+ port: 2113\n+ targetPort: 2113\n+ protocol: TCP\n+ selector:\n+ app: vsphere-csi-controller\n+---\n+kind: Deployment\n+apiVersion: apps/v1\n+metadata:\n+ name: vsphere-csi-controller\n+ namespace: vmware-system-csi\n+spec:\n+ replicas: 3\n+ strategy:\n+ type: RollingUpdate\n+ rollingUpdate:\n+ maxUnavailable: 1\n+ maxSurge: 0\n+ selector:\n+ matchLabels:\n+ app: vsphere-csi-controller\n+ template:\n+ metadata:\n+ labels:\n+ app: vsphere-csi-controller\n+ role: vsphere-csi\n+ spec:\n+ priorityClassName: system-cluster-critical # Guarantees scheduling for critical system pods\n+ affinity:\n+ podAntiAffinity:\n+ requiredDuringSchedulingIgnoredDuringExecution:\n+ - labelSelector:\n+ matchExpressions:\n+ - key: \"app\"\n+ operator: In\n+ values:\n+ - vsphere-csi-controller\n+ topologyKey: \"kubernetes.io/hostname\"\n+ serviceAccountName: vsphere-csi-controller\n+ nodeSelector:\n+ node-role.kubernetes.io/control-plane: \"\"\n+ tolerations:\n+ - key: node-role.kubernetes.io/master\n+ operator: Exists\n+ effect: NoSchedule\n+ - key: node-role.kubernetes.io/control-plane\n+ operator: Exists\n+ effect: NoSchedule\n+ # uncomment below toleration if you need an aggressive pod eviction in case when\n+ # node becomes not-ready or unreachable. Default is 300 seconds if not specified.\n+ #- key: node.kubernetes.io/not-ready\n+ # operator: Exists\n+ # effect: NoExecute\n+ # tolerationSeconds: 30\n+ #- key: node.kubernetes.io/unreachable\n+ # operator: Exists\n+ # effect: NoExecute\n+ # tolerationSeconds: 30\n+ dnsPolicy: \"Default\"\n+ containers:\n+ - name: csi-attacher\n+ image: k8s.gcr.io/sig-storage/csi-attacher:v4.2.0\n+ args:\n+ - \"--v=4\"\n+ - \"--timeout=300s\"\n+ - \"--csi-address=$(ADDRESS)\"\n+ - \"--leader-election\"\n+ - \"--leader-election-lease-duration=120s\"\n+ - \"--leader-election-renew-deadline=60s\"\n+ - \"--leader-election-retry-period=30s\"\n+ - \"--kube-api-qps=100\"\n+ - \"--kube-api-burst=100\"\n+ env:\n+ - name: ADDRESS\n+ value: /csi/csi.sock\n+ volumeMounts:\n+ - mountPath: /csi\n+ name: socket-dir\n+ - name: csi-resizer\n+ image: k8s.gcr.io/sig-storage/csi-resizer:v1.7.0\n+ args:\n+ - \"--v=4\"\n+ - \"--timeout=300s\"\n+ - \"--handle-volume-inuse-error=false\"\n+ - \"--csi-address=$(ADDRESS)\"\n+ - \"--kube-api-qps=100\"\n+ - \"--kube-api-burst=100\"\n+ - \"--leader-election\"\n+ - \"--leader-election-lease-duration=120s\"\n+ - \"--leader-election-renew-deadline=60s\"\n+ - \"--leader-election-retry-period=30s\"\n+ env:\n+ - name: ADDRESS\n+ value: /csi/csi.sock\n+ volumeMounts:\n+ - mountPath: /csi\n+ name: socket-dir\n+ - name: vsphere-csi-controller\n+ image: gcr.io/cloud-provider-vsphere/csi/release/driver:v3.0.0\n+ args:\n+ - \"--fss-name=internal-feature-states.csi.vsphere.vmware.com\"\n+ - \"--fss-namespace=$(CSI_NAMESPACE)\"\n+ imagePullPolicy: \"Always\"\n+ env:\n+ - name: CSI_ENDPOINT\n+ value: unix:///csi/csi.sock\n+ - name: X_CSI_MODE\n+ value: \"controller\"\n+ - name: X_CSI_SPEC_DISABLE_LEN_CHECK\n+ value: \"true\"\n+ - name: X_CSI_SERIAL_VOL_ACCESS_TIMEOUT\n+ value: 3m\n+ - name: VSPHERE_CSI_CONFIG\n+ value: \"/etc/cloud/csi-vsphere.conf\"\n+ - name: LOGGER_LEVEL\n+ value: \"PRODUCTION\" # Options: DEVELOPMENT, PRODUCTION\n+ - name: INCLUSTER_CLIENT_QPS\n+ value: \"100\"\n+ - name: INCLUSTER_CLIENT_BURST\n+ value: \"100\"\n+ - name: CSI_NAMESPACE\n+ valueFrom:\n+ fieldRef:\n+ fieldPath: metadata.namespace\n+ volumeMounts:\n+ - mountPath: /etc/cloud\n+ name: vsphere-config-volume\n+ readOnly: true\n+ - mountPath: /csi\n+ name: socket-dir\n+ ports:\n+ - name: healthz\n+ containerPort: 9808\n+ protocol: TCP\n+ - name: prometheus\n+ containerPort: 2112\n+ protocol: TCP\n+ livenessProbe:\n+ httpGet:\n+ path: /healthz\n+ port: healthz\n+ initialDelaySeconds: 30\n+ timeoutSeconds: 10\n+ periodSeconds: 180\n+ failureThreshold: 3\n+ - name: liveness-probe\n+ image: k8s.gcr.io/sig-storage/livenessprobe:v2.9.0\n+ args:\n+ - \"--v=4\"\n+ - \"--csi-address=/csi/csi.sock\"\n+ volumeMounts:\n+ - name: socket-dir\n+ mountPath: /csi\n+ - name: vsphere-syncer\n+ image: gcr.io/cloud-provider-vsphere/csi/release/syncer:v3.0.0\n+ args:\n+ - \"--leader-election\"\n+ - \"--leader-election-lease-duration=120s\"\n+ - \"--leader-election-renew-deadline=60s\"\n+ - \"--leader-election-retry-period=30s\"\n+ - \"--fss-name=internal-feature-states.csi.vsphere.vmware.com\"\n+ - \"--fss-namespace=$(CSI_NAMESPACE)\"\n+ imagePullPolicy: \"Always\"\n+ ports:\n+ - containerPort: 2113\n+ name: prometheus\n+ protocol: TCP\n+ env:\n+ - name: FULL_SYNC_INTERVAL_MINUTES\n+ value: \"30\"\n+ - name: VSPHERE_CSI_CONFIG\n+ value: \"/etc/cloud/csi-vsphere.conf\"\n+ - name: LOGGER_LEVEL\n+ value: \"PRODUCTION\" # Options: DEVELOPMENT, PRODUCTION\n+ - name: INCLUSTER_CLIENT_QPS\n+ value: \"100\"\n+ - name: INCLUSTER_CLIENT_BURST\n+ value: \"100\"\n+ - name: GODEBUG\n+ value: x509sha1=1\n+ - name: CSI_NAMESPACE\n+ valueFrom:\n+ fieldRef:\n+ fieldPath: metadata.namespace\n+ volumeMounts:\n+ - mountPath: /etc/cloud\n+ name: vsphere-config-volume\n+ readOnly: true\n+ - name: csi-provisioner\n+ image: k8s.gcr.io/sig-storage/csi-provisioner:v3.4.0\n+ args:\n+ - \"--v=4\"\n+ - \"--timeout=300s\"\n+ - \"--csi-address=$(ADDRESS)\"\n+ - \"--kube-api-qps=100\"\n+ - \"--kube-api-burst=100\"\n+ - \"--leader-election\"\n+ - \"--leader-election-lease-duration=120s\"\n+ - \"--leader-election-renew-deadline=60s\"\n+ - \"--leader-election-retry-period=30s\"\n+ - \"--default-fstype=ext4\"\n+ # needed only for topology aware setup\n+ #- \"--feature-gates=Topology=true\"\n+ #- \"--strict-topology\"\n+ env:\n+ - name: ADDRESS\n+ value: /csi/csi.sock\n+ volumeMounts:\n+ - mountPath: /csi\n+ name: socket-dir\n+ - name: csi-snapshotter\n+ image: k8s.gcr.io/sig-storage/csi-snapshotter:v6.2.1\n+ args:\n+ - \"--v=4\"\n+ - \"--kube-api-qps=100\"\n+ - \"--kube-api-burst=100\"\n+ - \"--timeout=300s\"\n+ - \"--csi-address=$(ADDRESS)\"\n+ - \"--leader-election\"\n+ - \"--leader-election-lease-duration=120s\"\n+ - \"--leader-election-renew-deadline=60s\"\n+ - \"--leader-election-retry-period=30s\"\n+ env:\n+ - name: ADDRESS\n+ value: /csi/csi.sock\n+ volumeMounts:\n+ - mountPath: /csi\n+ name: socket-dir\n+ volumes:\n+ - name: vsphere-config-volume\n+ secret:\n+ secretName: vsphere-config-secret\n+ - name: socket-dir\n+ emptyDir: {}\n+---\n+kind: DaemonSet\n+apiVersion: apps/v1\n+metadata:\n+ name: vsphere-csi-node\n+ namespace: vmware-system-csi\n+spec:\n+ selector:\n+ matchLabels:\n+ app: vsphere-csi-node\n+ updateStrategy:\n+ type: \"RollingUpdate\"\n+ rollingUpdate:\n+ maxUnavailable: 1\n+ template:\n+ metadata:\n+ labels:\n+ app: vsphere-csi-node\n+ role: vsphere-csi\n+ spec:\n+ priorityClassName: system-node-critical\n+ nodeSelector:\n+ kubernetes.io/os: linux\n+ serviceAccountName: vsphere-csi-node\n+ hostNetwork: true\n+ dnsPolicy: \"ClusterFirstWithHostNet\"\n+ containers:\n+ - name: node-driver-registrar\n+ image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.7.0\n+ args:\n+ - \"--v=5\"\n+ - \"--csi-address=$(ADDRESS)\"\n+ - \"--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)\"\n+ env:\n+ - name: ADDRESS\n+ value: /csi/csi.sock\n+ - name: DRIVER_REG_SOCK_PATH\n+ value: /var/lib/kubelet/plugins/csi.vsphere.vmware.com/csi.sock\n+ volumeMounts:\n+ - name: plugin-dir\n+ mountPath: /csi\n+ - name: registration-dir\n+ mountPath: /registration\n+ livenessProbe:\n+ exec:\n+ command:\n+ - /csi-node-driver-registrar\n+ - --kubelet-registration-path=/var/lib/kubelet/plugins/csi.vsphere.vmware.com/csi.sock\n+ - --mode=kubelet-registration-probe\n+ initialDelaySeconds: 3\n+ - name: vsphere-csi-node\n+ image: gcr.io/cloud-provider-vsphere/csi/release/driver:v3.0.0\n+ args:\n+ - \"--fss-name=internal-feature-states.csi.vsphere.vmware.com\"\n+ - \"--fss-namespace=$(CSI_NAMESPACE)\"\n+ imagePullPolicy: \"Always\"\n+ env:\n+ - name: NODE_NAME\n+ valueFrom:\n+ fieldRef:\n+ fieldPath: spec.nodeName\n+ - name: CSI_ENDPOINT\n+ value: unix:///csi/csi.sock\n+ - name: MAX_VOLUMES_PER_NODE\n+ value: \"59\" # Maximum number of volumes that controller can publish to the node. If value is not set or zero Kubernetes decide how many volumes can be published by the controller to the node.\n+ - name: X_CSI_MODE\n+ value: \"node\"\n+ - name: X_CSI_SPEC_REQ_VALIDATION\n+ value: \"false\"\n+ - name: X_CSI_SPEC_DISABLE_LEN_CHECK\n+ value: \"true\"\n+ - name: LOGGER_LEVEL\n+ value: \"PRODUCTION\" # Options: DEVELOPMENT, PRODUCTION\n+ - name: GODEBUG\n+ value: x509sha1=1\n+ - name: CSI_NAMESPACE\n+ valueFrom:\n+ fieldRef:\n+ fieldPath: metadata.namespace\n+ - name: NODEGETINFO_WATCH_TIMEOUT_MINUTES\n+ value: \"1\"\n+ securityContext:\n+ privileged: true\n+ capabilities:\n+ add: [\"SYS_ADMIN\"]\n+ allowPrivilegeEscalation: true\n+ volumeMounts:\n+ - name: plugin-dir\n+ mountPath: /csi\n+ - name: pods-mount-dir\n+ mountPath: /var/lib/kubelet\n+ # needed so that any mounts setup inside this container are\n+ # propagated back to the host machine.\n+ mountPropagation: \"Bidirectional\"\n+ - name: device-dir\n+ mountPath: /dev\n+ - name: blocks-dir\n+ mountPath: /sys/block\n+ - name: sys-devices-dir\n+ mountPath: /sys/devices\n+ ports:\n+ - name: healthz\n+ containerPort: 9808\n+ protocol: TCP\n+ livenessProbe:\n+ httpGet:\n+ path: /healthz\n+ port: healthz\n+ initialDelaySeconds: 10\n+ timeoutSeconds: 5\n+ periodSeconds: 5\n+ failureThreshold: 3\n+ - name: liveness-probe\n+ image: k8s.gcr.io/sig-storage/livenessprobe:v2.9.0\n+ args:\n+ - \"--v=4\"\n+ - \"--csi-address=/csi/csi.sock\"\n+ volumeMounts:\n+ - name: plugin-dir\n+ mountPath: /csi\n+ volumes:\n+ - name: registration-dir\n+ hostPath:\n+ path: /var/lib/kubelet/plugins_registry\n+ type: Directory\n+ - name: plugin-dir\n+ hostPath:\n+ path: /var/lib/kubelet/plugins/csi.vsphere.vmware.com\n+ type: DirectoryOrCreate\n+ - name: pods-mount-dir\n+ hostPath:\n+ path: /var/lib/kubelet\n+ type: Directory\n+ - name: device-dir\n+ hostPath:\n+ path: /dev\n+ - name: blocks-dir\n+ hostPath:\n+ path: /sys/block\n+ type: Directory\n+ - name: sys-devices-dir\n+ hostPath:\n+ path: /sys/devices\n+ type: Directory\n+ tolerations:\n+ - effect: NoExecute\n+ operator: Exists\n+ - effect: NoSchedule\n+ operator: Exists\n+---\n+kind: DaemonSet\n+apiVersion: apps/v1\n+metadata:\n+ name: vsphere-csi-node-windows\n+ namespace: vmware-system-csi\n+spec:\n+ selector:\n+ matchLabels:\n+ app: vsphere-csi-node-windows\n+ updateStrategy:\n+ type: RollingUpdate\n+ rollingUpdate:\n+ maxUnavailable: 1\n+ template:\n+ metadata:\n+ labels:\n+ app: vsphere-csi-node-windows\n+ role: vsphere-csi-windows\n+ spec:\n+ priorityClassName: system-node-critical\n+ nodeSelector:\n+ kubernetes.io/os: windows\n+ serviceAccountName: vsphere-csi-node\n+ containers:\n+ - name: node-driver-registrar\n+ image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.7.0\n+ args:\n+ - \"--v=5\"\n+ - \"--csi-address=$(ADDRESS)\"\n+ - \"--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)\"\n+ env:\n+ - name: ADDRESS\n+ value: 'unix://C:\\\\csi\\\\csi.sock'\n+ - name: DRIVER_REG_SOCK_PATH\n+ value: 'C:\\\\var\\\\lib\\\\kubelet\\\\plugins\\\\csi.vsphere.vmware.com\\\\csi.sock'\n+ volumeMounts:\n+ - name: plugin-dir\n+ mountPath: /csi\n+ - name: registration-dir\n+ mountPath: /registration\n+ livenessProbe:\n+ exec:\n+ command:\n+ - /csi-node-driver-registrar.exe\n+ - --kubelet-registration-path=C:\\\\var\\\\lib\\\\kubelet\\\\plugins\\\\csi.vsphere.vmware.com\\\\csi.sock\n+ - --mode=kubelet-registration-probe\n+ initialDelaySeconds: 3\n+ - name: vsphere-csi-node\n+ image: gcr.io/cloud-provider-vsphere/csi/release/driver:v3.0.0\n+ args:\n+ - \"--fss-name=internal-feature-states.csi.vsphere.vmware.com\"\n+ - \"--fss-namespace=$(CSI_NAMESPACE)\"\n+ imagePullPolicy: \"Always\"\n+ env:\n+ - name: NODE_NAME\n+ valueFrom:\n+ fieldRef:\n+ apiVersion: v1\n+ fieldPath: spec.nodeName \n+ - name: CSI_ENDPOINT\n+ value: 'unix://C:\\\\csi\\\\csi.sock'\n+ - name: MAX_VOLUMES_PER_NODE\n+ value: \"59\" # Maximum number of volumes that controller can publish to the node. If value is not set or zero Kubernetes decide how many volumes can be published by the controller to the node.\n+ - name: X_CSI_MODE\n+ value: node\n+ - name: X_CSI_SPEC_REQ_VALIDATION\n+ value: 'false'\n+ - name: X_CSI_SPEC_DISABLE_LEN_CHECK\n+ value: \"true\"\n+ - name: LOGGER_LEVEL\n+ value: \"PRODUCTION\" # Options: DEVELOPMENT, PRODUCTION\n+ - name: X_CSI_LOG_LEVEL\n+ value: DEBUG\n+ - name: CSI_NAMESPACE\n+ valueFrom:\n+ fieldRef:\n+ fieldPath: metadata.namespace\n+ - name: NODEGETINFO_WATCH_TIMEOUT_MINUTES\n+ value: \"1\"\n+ volumeMounts:\n+ - name: plugin-dir\n+ mountPath: 'C:\\csi'\n+ - name: pods-mount-dir\n+ mountPath: 'C:\\var\\lib\\kubelet' \n+ - name: csi-proxy-volume-v1\n+ mountPath: \\\\.\\pipe\\csi-proxy-volume-v1\n+ - name: csi-proxy-filesystem-v1\n+ mountPath: \\\\.\\pipe\\csi-proxy-filesystem-v1\n+ - name: csi-proxy-disk-v1\n+ mountPath: \\\\.\\pipe\\csi-proxy-disk-v1 \n+ - name: csi-proxy-system-v1alpha1\n+ mountPath: \\\\.\\pipe\\csi-proxy-system-v1alpha1\n+ ports:\n+ - name: healthz\n+ containerPort: 9808\n+ protocol: TCP\n+ livenessProbe:\n+ httpGet:\n+ path: /healthz\n+ port: healthz\n+ initialDelaySeconds: 10\n+ timeoutSeconds: 5\n+ periodSeconds: 5\n+ failureThreshold: 3\n+ - name: liveness-probe\n+ image: k8s.gcr.io/sig-storage/livenessprobe:v2.9.0\n+ args:\n+ - \"--v=4\"\n+ - \"--csi-address=/csi/csi.sock\"\n+ volumeMounts:\n+ - name: plugin-dir\n+ mountPath: /csi\n+ volumes:\n+ - name: registration-dir\n+ hostPath:\n+ path: 'C:\\var\\lib\\kubelet\\plugins_registry\\'\n+ type: Directory\n+ - name: plugin-dir\n+ hostPath:\n+ path: 'C:\\var\\lib\\kubelet\\plugins\\csi.vsphere.vmware.com\\'\n+ type: DirectoryOrCreate\n+ - name: pods-mount-dir\n+ hostPath:\n+ path: \\var\\lib\\kubelet\n+ type: Directory\n+ - name: csi-proxy-disk-v1\n+ hostPath:\n+ path: \\\\.\\pipe\\csi-proxy-disk-v1\n+ type: ''\n+ - name: csi-proxy-volume-v1\n+ hostPath:\n+ path: \\\\.\\pipe\\csi-proxy-volume-v1\n+ type: ''\n+ - name: csi-proxy-filesystem-v1\n+ hostPath:\n+ path: \\\\.\\pipe\\csi-proxy-filesystem-v1\n+ type: ''\n+ - name: csi-proxy-system-v1alpha1\n+ hostPath:\n+ path: \\\\.\\pipe\\csi-proxy-system-v1alpha1\n+ type: ''\n+ tolerations:\n+ - effect: NoExecute\n+ operator: Exists\n+ - effect: NoSchedule\n+ operator: Exists\n\\ No newline at end of file" }, { "sha": "0ba9931c7bf5a22da94dd6264a7a2c462b4d8c1a", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/vsphere-csi-externalsecrets.yaml", "status": "added", "additions": 37, "deletions": 0, "changes": 37, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-csi-externalsecrets.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-csi-externalsecrets.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-csi-externalsecrets.yaml?ref=919469f6ec8827550101162b3710347d1ee8a735", "patch": "@@ -0,0 +1,37 @@\n+---\n+apiVersion: external-secrets.io/v1beta1\n+kind: ExternalSecret\n+metadata:\n+ name: vsphere-cloud-config\n+ namespace: kube-system\n+ labels:\n+ vsphere-cpi-infra: config\n+ component: cloud-controller-manager\n+spec:\n+ refreshInterval: 1m\n+ secretStoreRef:\n+ name: eksa-secret-store #The secret store name we have just created.\n+ kind: ClusterSecretStore\n+ target:\n+ name: vsphere.conf # Secret name in k8s\n+ data:\n+ - secretKey: vsphere.conf # which key it's going to be stored in\n+ remoteRef:\n+ key: vsphere.conf # External secret name goes here\n+---\n+apiVersion: external-secrets.io/v1beta1\n+kind: ExternalSecret\n+metadata:\n+ name: vsphere-config-secret\n+ namespace: vmware-system-csi\n+spec:\n+ refreshInterval: 1m\n+ secretStoreRef:\n+ name: eksa-secret-store #The secret store name we have just created.\n+ kind: ClusterSecretStore\n+ target:\n+ name: vsphere-config-secret # Secret name in k8s\n+ data:\n+ - secretKey: csi-vsphere.conf # which key it's going to be stored in\n+ remoteRef:\n+ key: csi-vsphere.conf # External secret name goes here\n\\ No newline at end of file" } ] \ No newline at end of file From cf17e41c08882ac6c1772731d92a3618de066dc7 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 23:23:09 +0000 Subject: [PATCH 022/104] remove txt file --- blob.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 blob.txt diff --git a/blob.txt b/blob.txt deleted file mode 100644 index 5f222192..00000000 --- a/blob.txt +++ /dev/null @@ -1 +0,0 @@ -[ { "sha": "58dee1e2fdec28d85d5c4fbb1effc0f57a569e3c", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/openebs/helm-release.yaml", "status": "removed", "additions": 0, "deletions": 19, "changes": 19, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/132b6f3f37b1e19a19b5293e8e27f2aebe814727/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fhelm-release.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/132b6f3f37b1e19a19b5293e8e27f2aebe814727/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fhelm-release.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fhelm-release.yaml?ref=132b6f3f37b1e19a19b5293e8e27f2aebe814727", "patch": "@@ -1,19 +0,0 @@\n----\n-apiVersion: helm.toolkit.fluxcd.io/v2beta1\n-kind: HelmRelease\n-metadata:\n- name: openebs\n- namespace: openebs\n-spec:\n- chart:\n- spec:\n- chart: openebs\n- reconcileStrategy: ChartVersion\n- sourceRef:\n- kind: HelmRepository\n- name: openebs\n- namespace: openebs\n- version: \"3.3.0\"\n- interval: 60s\n- targetNamespace: openebs\n- " }, { "sha": "d9665841e64ad0da69035d1a59f70ea5188f73ac", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/openebs/helm-repo.yaml", "status": "removed", "additions": 0, "deletions": 10, "changes": 10, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/132b6f3f37b1e19a19b5293e8e27f2aebe814727/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fhelm-repo.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/132b6f3f37b1e19a19b5293e8e27f2aebe814727/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fhelm-repo.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fhelm-repo.yaml?ref=132b6f3f37b1e19a19b5293e8e27f2aebe814727", "patch": "@@ -1,10 +0,0 @@\n----\n-apiVersion: source.toolkit.fluxcd.io/v1beta2\n-kind: HelmRepository\n-metadata:\n- name: openebs\n- namespace: openebs\n-spec:\n- interval: 30s\n- url: https://openebs.github.io/charts\n-" }, { "sha": "de9f0a8449e1f7ecfb331a60afc362319e7d5bb5", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/openebs/kustomization.yaml", "status": "removed", "additions": 0, "deletions": 6, "changes": 6, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/132b6f3f37b1e19a19b5293e8e27f2aebe814727/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fkustomization.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/132b6f3f37b1e19a19b5293e8e27f2aebe814727/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fkustomization.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fopenebs%2Fkustomization.yaml?ref=132b6f3f37b1e19a19b5293e8e27f2aebe814727", "patch": "@@ -1,6 +0,0 @@\n-apiVersion: kustomize.config.k8s.io/v1beta1\n-kind: Kustomization\n-resources:\n- - namespace.yaml\n- - helm-repo.yaml\n- - helm-release.yaml\n\\ No newline at end of file" }, { "sha": "df0cd2432ec58a46ad91c81440e4c6c5b5e0cccd", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/storage-driver.yaml", "status": "modified", "additions": 2, "deletions": 2, "changes": 4, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fstorage-driver.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fstorage-driver.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fstorage-driver.yaml?ref=919469f6ec8827550101162b3710347d1ee8a735", "patch": "@@ -1,10 +1,10 @@\n apiVersion: kustomize.toolkit.fluxcd.io/v1beta2\n kind: Kustomization\n metadata:\n- name: openebs\n+ name: vmware-csi\n namespace: flux-system\n spec:\n- path: \"./eks-anywhere-vsphere/Addons/Core/storage-driver/openebs\"\n+ path: \"./eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi\"\n sourceRef:\n kind: GitRepository\n name: addons" }, { "sha": "c9bbb152079b0cc5c336ac58bb0275f99f7598f3", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/kustomization.yaml", "status": "added", "additions": 8, "deletions": 0, "changes": 8, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fkustomization.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fkustomization.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fkustomization.yaml?ref=919469f6ec8827550101162b3710347d1ee8a735", "patch": "@@ -0,0 +1,8 @@\n+apiVersion: kustomize.config.k8s.io/v1beta1\n+kind: Kustomization\n+resources:\n+ - namespace.yaml\n+ - vsphere-cloud-controller-manager.yaml\n+ - vsphere-csi-externalsecrets.yaml\n+ - vsphere-csi-driver.yaml\n+ - vmware-sc.yaml\n\\ No newline at end of file" }, { "sha": "f6b4f38be04e8eaddc66820e904bd264357fa6dc", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/namespace.yaml", "status": "renamed", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fnamespace.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fnamespace.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fnamespace.yaml?ref=919469f6ec8827550101162b3710347d1ee8a735", "patch": "@@ -1,4 +1,4 @@\n apiVersion: v1\n kind: Namespace\n metadata:\n- name: openebs\n\\ No newline at end of file\n+ name: vmware-system-csi\n\\ No newline at end of file", "previous_filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/openebs/namespace.yaml" }, { "sha": "14b2898cab6c32a63c95255bcc5c2ea1f03c4967", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/vmware-sc.yaml", "status": "added", "additions": 7, "deletions": 0, "changes": 7, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvmware-sc.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvmware-sc.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvmware-sc.yaml?ref=919469f6ec8827550101162b3710347d1ee8a735", "patch": "@@ -0,0 +1,7 @@\n+kind: StorageClass\n+apiVersion: storage.k8s.io/v1\n+metadata:\n+ name: vmware-sc\n+ annotations:\n+ storageclass.kubernetes.io/is-default-class: \"true\"\n+provisioner: csi.vsphere.vmware.com\n\\ No newline at end of file" }, { "sha": "22880a6eac1e778d6743d587855d3f25331c54e9", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/vsphere-cloud-controller-manager.yaml", "status": "added", "additions": 207, "deletions": 0, "changes": 207, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-cloud-controller-manager.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-cloud-controller-manager.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-cloud-controller-manager.yaml?ref=919469f6ec8827550101162b3710347d1ee8a735", "patch": "@@ -0,0 +1,207 @@\n+---\n+apiVersion: v1\n+kind: ServiceAccount\n+metadata:\n+ name: cloud-controller-manager\n+ labels:\n+ vsphere-cpi-infra: service-account\n+ component: cloud-controller-manager\n+ namespace: kube-system\n+---\n+apiVersion: rbac.authorization.k8s.io/v1\n+kind: RoleBinding\n+metadata:\n+ name: servicecatalog.k8s.io:apiserver-authentication-reader\n+ labels:\n+ vsphere-cpi-infra: role-binding\n+ component: cloud-controller-manager\n+ namespace: kube-system\n+roleRef:\n+ apiGroup: rbac.authorization.k8s.io\n+ kind: Role\n+ name: extension-apiserver-authentication-reader\n+subjects:\n+ - apiGroup: \"\"\n+ kind: ServiceAccount\n+ name: cloud-controller-manager\n+ namespace: kube-system\n+ - apiGroup: \"\"\n+ kind: User\n+ name: cloud-controller-manager\n+---\n+apiVersion: rbac.authorization.k8s.io/v1\n+kind: ClusterRoleBinding\n+metadata:\n+ name: system:cloud-controller-manager\n+ labels:\n+ vsphere-cpi-infra: cluster-role-binding\n+ component: cloud-controller-manager\n+roleRef:\n+ apiGroup: rbac.authorization.k8s.io\n+ kind: ClusterRole\n+ name: system:cloud-controller-manager\n+subjects:\n+ - kind: ServiceAccount\n+ name: cloud-controller-manager\n+ namespace: kube-system\n+ - kind: User\n+ name: cloud-controller-manager\n+---\n+apiVersion: rbac.authorization.k8s.io/v1\n+kind: ClusterRole\n+metadata:\n+ name: system:cloud-controller-manager\n+ labels:\n+ vsphere-cpi-infra: role\n+ component: cloud-controller-manager\n+rules:\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - events\n+ verbs:\n+ - create\n+ - patch\n+ - update\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - nodes\n+ verbs:\n+ - \"*\"\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - nodes/status\n+ verbs:\n+ - patch\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - services\n+ verbs:\n+ - list\n+ - patch\n+ - update\n+ - watch\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - services/status\n+ verbs:\n+ - patch\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - serviceaccounts\n+ verbs:\n+ - create\n+ - get\n+ - list\n+ - watch\n+ - update\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - persistentvolumes\n+ verbs:\n+ - get\n+ - list\n+ - update\n+ - watch\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - endpoints\n+ verbs:\n+ - create\n+ - get\n+ - list\n+ - watch\n+ - update\n+ - apiGroups:\n+ - \"\"\n+ resources:\n+ - secrets\n+ verbs:\n+ - get\n+ - list\n+ - watch\n+ - apiGroups:\n+ - \"coordination.k8s.io\"\n+ resources:\n+ - leases\n+ verbs:\n+ - create\n+ - get\n+ - list\n+ - watch\n+ - update\n+---\n+apiVersion: apps/v1\n+kind: DaemonSet\n+metadata:\n+ name: vsphere-cloud-controller-manager\n+ labels:\n+ component: cloud-controller-manager\n+ tier: control-plane\n+ namespace: kube-system\n+spec:\n+ selector:\n+ matchLabels:\n+ name: vsphere-cloud-controller-manager\n+ updateStrategy:\n+ type: RollingUpdate\n+ template:\n+ metadata:\n+ labels:\n+ name: vsphere-cloud-controller-manager\n+ component: cloud-controller-manager\n+ tier: control-plane\n+ spec:\n+ tolerations:\n+ - key: node.cloudprovider.kubernetes.io/uninitialized\n+ value: \"true\"\n+ effect: NoSchedule\n+ - key: node-role.kubernetes.io/master\n+ effect: NoSchedule\n+ operator: Exists\n+ - key: node-role.kubernetes.io/control-plane\n+ effect: NoSchedule\n+ operator: Exists\n+ - key: node.kubernetes.io/not-ready\n+ effect: NoSchedule\n+ operator: Exists\n+ securityContext:\n+ runAsUser: 1001\n+ serviceAccountName: cloud-controller-manager\n+ priorityClassName: system-node-critical\n+ containers:\n+ - name: vsphere-cloud-controller-manager\n+ image: gcr.io/cloud-provider-vsphere/cpi/release/manager:v1.28.0\n+ args:\n+ - --cloud-provider=vsphere\n+ - --v=2\n+ - --cloud-config=/etc/cloud/vsphere.conf\n+ volumeMounts:\n+ - mountPath: /etc/cloud\n+ name: vsphere-config-volume\n+ readOnly: true\n+ resources:\n+ requests:\n+ cpu: 200m\n+ hostNetwork: true\n+ volumes:\n+ - name: vsphere-config-volume\n+ secret:\n+ secretName: vsphere.conf\n+ affinity:\n+ nodeAffinity:\n+ requiredDuringSchedulingIgnoredDuringExecution:\n+ nodeSelectorTerms:\n+ - matchExpressions:\n+ - key: node-role.kubernetes.io/control-plane\n+ operator: Exists\n+ - matchExpressions:\n+ - key: node-role.kubernetes.io/master\n+ operator: Exists" }, { "sha": "44df966127dae65d97e92c2db484da62c5995333", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/vsphere-csi-driver.yaml", "status": "added", "additions": 715, "deletions": 0, "changes": 715, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-csi-driver.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-csi-driver.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-csi-driver.yaml?ref=919469f6ec8827550101162b3710347d1ee8a735", "patch": "@@ -0,0 +1,715 @@\n+apiVersion: storage.k8s.io/v1\n+kind: CSIDriver\n+metadata:\n+ name: csi.vsphere.vmware.com\n+spec:\n+ attachRequired: true\n+ podInfoOnMount: false\n+---\n+kind: ServiceAccount\n+apiVersion: v1\n+metadata:\n+ name: vsphere-csi-controller\n+ namespace: vmware-system-csi\n+---\n+kind: ClusterRole\n+apiVersion: rbac.authorization.k8s.io/v1\n+metadata:\n+ name: vsphere-csi-controller-role\n+rules:\n+ - apiGroups: [\"\"]\n+ resources: [\"nodes\", \"pods\"]\n+ verbs: [\"get\", \"list\", \"watch\"]\n+ - apiGroups: [\"\"]\n+ resources: [\"configmaps\"]\n+ verbs: [\"get\", \"list\", \"watch\", \"create\"]\n+ - apiGroups: [\"\"]\n+ resources: [\"persistentvolumeclaims\"]\n+ verbs: [\"get\", \"list\", \"watch\", \"update\"]\n+ - apiGroups: [\"\"]\n+ resources: [\"persistentvolumeclaims/status\"]\n+ verbs: [\"patch\"]\n+ - apiGroups: [\"\"]\n+ resources: [\"persistentvolumes\"]\n+ verbs: [\"get\", \"list\", \"watch\", \"create\", \"update\", \"delete\", \"patch\"]\n+ - apiGroups: [\"\"]\n+ resources: [\"events\"]\n+ verbs: [\"get\", \"list\", \"watch\", \"create\", \"update\", \"patch\"]\n+ - apiGroups: [\"coordination.k8s.io\"]\n+ resources: [\"leases\"]\n+ verbs: [\"get\", \"watch\", \"list\", \"delete\", \"update\", \"create\"]\n+ - apiGroups: [\"storage.k8s.io\"]\n+ resources: [\"storageclasses\", \"csinodes\"]\n+ verbs: [\"get\", \"list\", \"watch\"]\n+ - apiGroups: [\"storage.k8s.io\"]\n+ resources: [\"volumeattachments\"]\n+ verbs: [\"get\", \"list\", \"watch\", \"patch\"]\n+ - apiGroups: [\"cns.vmware.com\"]\n+ resources: [\"triggercsifullsyncs\"]\n+ verbs: [\"create\", \"get\", \"update\", \"watch\", \"list\"]\n+ - apiGroups: [\"cns.vmware.com\"]\n+ resources: [\"cnsvspherevolumemigrations\"]\n+ verbs: [\"create\", \"get\", \"list\", \"watch\", \"update\", \"delete\"]\n+ - apiGroups: [\"cns.vmware.com\"]\n+ resources: [\"cnsvolumeinfoes\"]\n+ verbs: [\"create\", \"get\", \"list\", \"watch\", \"delete\"]\n+ - apiGroups: [\"apiextensions.k8s.io\"]\n+ resources: [\"customresourcedefinitions\"]\n+ verbs: [\"get\", \"create\", \"update\"]\n+ - apiGroups: [\"storage.k8s.io\"]\n+ resources: [\"volumeattachments/status\"]\n+ verbs: [\"patch\"]\n+ - apiGroups: [\"cns.vmware.com\"]\n+ resources: [\"cnsvolumeoperationrequests\"]\n+ verbs: [\"create\", \"get\", \"list\", \"update\", \"delete\"]\n+ - apiGroups: [ \"snapshot.storage.k8s.io\" ]\n+ resources: [ \"volumesnapshots\" ]\n+ verbs: [ \"get\", \"list\" ]\n+ - apiGroups: [ \"snapshot.storage.k8s.io\" ]\n+ resources: [ \"volumesnapshotclasses\" ]\n+ verbs: [ \"watch\", \"get\", \"list\" ]\n+ - apiGroups: [ \"snapshot.storage.k8s.io\" ]\n+ resources: [ \"volumesnapshotcontents\" ]\n+ verbs: [ \"create\", \"get\", \"list\", \"watch\", \"update\", \"delete\", \"patch\"]\n+ - apiGroups: [ \"snapshot.storage.k8s.io\" ]\n+ resources: [ \"volumesnapshotcontents/status\" ]\n+ verbs: [ \"update\", \"patch\" ]\n+ - apiGroups: [ \"cns.vmware.com\" ]\n+ resources: [ \"csinodetopologies\" ]\n+ verbs: [\"get\", \"update\", \"watch\", \"list\"]\n+---\n+kind: ClusterRoleBinding\n+apiVersion: rbac.authorization.k8s.io/v1\n+metadata:\n+ name: vsphere-csi-controller-binding\n+subjects:\n+ - kind: ServiceAccount\n+ name: vsphere-csi-controller\n+ namespace: vmware-system-csi\n+roleRef:\n+ kind: ClusterRole\n+ name: vsphere-csi-controller-role\n+ apiGroup: rbac.authorization.k8s.io\n+---\n+kind: ServiceAccount\n+apiVersion: v1\n+metadata:\n+ name: vsphere-csi-node\n+ namespace: vmware-system-csi\n+---\n+kind: ClusterRole\n+apiVersion: rbac.authorization.k8s.io/v1\n+metadata:\n+ name: vsphere-csi-node-cluster-role\n+rules:\n+ - apiGroups: [\"cns.vmware.com\"]\n+ resources: [\"csinodetopologies\"]\n+ verbs: [\"create\", \"watch\", \"get\", \"patch\"]\n+ - apiGroups: [\"\"]\n+ resources: [\"nodes\"]\n+ verbs: [\"get\"]\n+---\n+kind: ClusterRoleBinding\n+apiVersion: rbac.authorization.k8s.io/v1\n+metadata:\n+ name: vsphere-csi-node-cluster-role-binding\n+subjects:\n+ - kind: ServiceAccount\n+ name: vsphere-csi-node\n+ namespace: vmware-system-csi\n+roleRef:\n+ kind: ClusterRole\n+ name: vsphere-csi-node-cluster-role\n+ apiGroup: rbac.authorization.k8s.io\n+---\n+kind: Role\n+apiVersion: rbac.authorization.k8s.io/v1\n+metadata:\n+ name: vsphere-csi-node-role\n+ namespace: vmware-system-csi\n+rules:\n+ - apiGroups: [\"\"]\n+ resources: [\"configmaps\"]\n+ verbs: [\"get\", \"list\", \"watch\"]\n+---\n+kind: RoleBinding\n+apiVersion: rbac.authorization.k8s.io/v1\n+metadata:\n+ name: vsphere-csi-node-binding\n+ namespace: vmware-system-csi\n+subjects:\n+ - kind: ServiceAccount\n+ name: vsphere-csi-node\n+ namespace: vmware-system-csi\n+roleRef:\n+ kind: Role\n+ name: vsphere-csi-node-role\n+ apiGroup: rbac.authorization.k8s.io\n+---\n+apiVersion: v1\n+data:\n+ \"csi-migration\": \"true\"\n+ \"csi-auth-check\": \"true\"\n+ \"online-volume-extend\": \"true\"\n+ \"trigger-csi-fullsync\": \"false\"\n+ \"async-query-volume\": \"true\"\n+ \"block-volume-snapshot\": \"true\"\n+ \"csi-windows-support\": \"true\"\n+ \"use-csinode-id\": \"true\"\n+ \"list-volumes\": \"true\"\n+ \"pv-to-backingdiskobjectid-mapping\": \"false\"\n+ \"cnsmgr-suspend-create-volume\": \"true\"\n+ \"topology-preferential-datastores\": \"true\"\n+ \"max-pvscsi-targets-per-vm\": \"true\"\n+ \"multi-vcenter-csi-topology\": \"true\"\n+ \"csi-internal-generated-cluster-id\": \"true\"\n+ \"listview-tasks\": \"false\"\n+kind: ConfigMap\n+metadata:\n+ name: internal-feature-states.csi.vsphere.vmware.com\n+ namespace: vmware-system-csi\n+---\n+apiVersion: v1\n+kind: Service\n+metadata:\n+ name: vsphere-csi-controller\n+ namespace: vmware-system-csi\n+ labels:\n+ app: vsphere-csi-controller\n+spec:\n+ ports:\n+ - name: ctlr\n+ port: 2112\n+ targetPort: 2112\n+ protocol: TCP\n+ - name: syncer\n+ port: 2113\n+ targetPort: 2113\n+ protocol: TCP\n+ selector:\n+ app: vsphere-csi-controller\n+---\n+kind: Deployment\n+apiVersion: apps/v1\n+metadata:\n+ name: vsphere-csi-controller\n+ namespace: vmware-system-csi\n+spec:\n+ replicas: 3\n+ strategy:\n+ type: RollingUpdate\n+ rollingUpdate:\n+ maxUnavailable: 1\n+ maxSurge: 0\n+ selector:\n+ matchLabels:\n+ app: vsphere-csi-controller\n+ template:\n+ metadata:\n+ labels:\n+ app: vsphere-csi-controller\n+ role: vsphere-csi\n+ spec:\n+ priorityClassName: system-cluster-critical # Guarantees scheduling for critical system pods\n+ affinity:\n+ podAntiAffinity:\n+ requiredDuringSchedulingIgnoredDuringExecution:\n+ - labelSelector:\n+ matchExpressions:\n+ - key: \"app\"\n+ operator: In\n+ values:\n+ - vsphere-csi-controller\n+ topologyKey: \"kubernetes.io/hostname\"\n+ serviceAccountName: vsphere-csi-controller\n+ nodeSelector:\n+ node-role.kubernetes.io/control-plane: \"\"\n+ tolerations:\n+ - key: node-role.kubernetes.io/master\n+ operator: Exists\n+ effect: NoSchedule\n+ - key: node-role.kubernetes.io/control-plane\n+ operator: Exists\n+ effect: NoSchedule\n+ # uncomment below toleration if you need an aggressive pod eviction in case when\n+ # node becomes not-ready or unreachable. Default is 300 seconds if not specified.\n+ #- key: node.kubernetes.io/not-ready\n+ # operator: Exists\n+ # effect: NoExecute\n+ # tolerationSeconds: 30\n+ #- key: node.kubernetes.io/unreachable\n+ # operator: Exists\n+ # effect: NoExecute\n+ # tolerationSeconds: 30\n+ dnsPolicy: \"Default\"\n+ containers:\n+ - name: csi-attacher\n+ image: k8s.gcr.io/sig-storage/csi-attacher:v4.2.0\n+ args:\n+ - \"--v=4\"\n+ - \"--timeout=300s\"\n+ - \"--csi-address=$(ADDRESS)\"\n+ - \"--leader-election\"\n+ - \"--leader-election-lease-duration=120s\"\n+ - \"--leader-election-renew-deadline=60s\"\n+ - \"--leader-election-retry-period=30s\"\n+ - \"--kube-api-qps=100\"\n+ - \"--kube-api-burst=100\"\n+ env:\n+ - name: ADDRESS\n+ value: /csi/csi.sock\n+ volumeMounts:\n+ - mountPath: /csi\n+ name: socket-dir\n+ - name: csi-resizer\n+ image: k8s.gcr.io/sig-storage/csi-resizer:v1.7.0\n+ args:\n+ - \"--v=4\"\n+ - \"--timeout=300s\"\n+ - \"--handle-volume-inuse-error=false\"\n+ - \"--csi-address=$(ADDRESS)\"\n+ - \"--kube-api-qps=100\"\n+ - \"--kube-api-burst=100\"\n+ - \"--leader-election\"\n+ - \"--leader-election-lease-duration=120s\"\n+ - \"--leader-election-renew-deadline=60s\"\n+ - \"--leader-election-retry-period=30s\"\n+ env:\n+ - name: ADDRESS\n+ value: /csi/csi.sock\n+ volumeMounts:\n+ - mountPath: /csi\n+ name: socket-dir\n+ - name: vsphere-csi-controller\n+ image: gcr.io/cloud-provider-vsphere/csi/release/driver:v3.0.0\n+ args:\n+ - \"--fss-name=internal-feature-states.csi.vsphere.vmware.com\"\n+ - \"--fss-namespace=$(CSI_NAMESPACE)\"\n+ imagePullPolicy: \"Always\"\n+ env:\n+ - name: CSI_ENDPOINT\n+ value: unix:///csi/csi.sock\n+ - name: X_CSI_MODE\n+ value: \"controller\"\n+ - name: X_CSI_SPEC_DISABLE_LEN_CHECK\n+ value: \"true\"\n+ - name: X_CSI_SERIAL_VOL_ACCESS_TIMEOUT\n+ value: 3m\n+ - name: VSPHERE_CSI_CONFIG\n+ value: \"/etc/cloud/csi-vsphere.conf\"\n+ - name: LOGGER_LEVEL\n+ value: \"PRODUCTION\" # Options: DEVELOPMENT, PRODUCTION\n+ - name: INCLUSTER_CLIENT_QPS\n+ value: \"100\"\n+ - name: INCLUSTER_CLIENT_BURST\n+ value: \"100\"\n+ - name: CSI_NAMESPACE\n+ valueFrom:\n+ fieldRef:\n+ fieldPath: metadata.namespace\n+ volumeMounts:\n+ - mountPath: /etc/cloud\n+ name: vsphere-config-volume\n+ readOnly: true\n+ - mountPath: /csi\n+ name: socket-dir\n+ ports:\n+ - name: healthz\n+ containerPort: 9808\n+ protocol: TCP\n+ - name: prometheus\n+ containerPort: 2112\n+ protocol: TCP\n+ livenessProbe:\n+ httpGet:\n+ path: /healthz\n+ port: healthz\n+ initialDelaySeconds: 30\n+ timeoutSeconds: 10\n+ periodSeconds: 180\n+ failureThreshold: 3\n+ - name: liveness-probe\n+ image: k8s.gcr.io/sig-storage/livenessprobe:v2.9.0\n+ args:\n+ - \"--v=4\"\n+ - \"--csi-address=/csi/csi.sock\"\n+ volumeMounts:\n+ - name: socket-dir\n+ mountPath: /csi\n+ - name: vsphere-syncer\n+ image: gcr.io/cloud-provider-vsphere/csi/release/syncer:v3.0.0\n+ args:\n+ - \"--leader-election\"\n+ - \"--leader-election-lease-duration=120s\"\n+ - \"--leader-election-renew-deadline=60s\"\n+ - \"--leader-election-retry-period=30s\"\n+ - \"--fss-name=internal-feature-states.csi.vsphere.vmware.com\"\n+ - \"--fss-namespace=$(CSI_NAMESPACE)\"\n+ imagePullPolicy: \"Always\"\n+ ports:\n+ - containerPort: 2113\n+ name: prometheus\n+ protocol: TCP\n+ env:\n+ - name: FULL_SYNC_INTERVAL_MINUTES\n+ value: \"30\"\n+ - name: VSPHERE_CSI_CONFIG\n+ value: \"/etc/cloud/csi-vsphere.conf\"\n+ - name: LOGGER_LEVEL\n+ value: \"PRODUCTION\" # Options: DEVELOPMENT, PRODUCTION\n+ - name: INCLUSTER_CLIENT_QPS\n+ value: \"100\"\n+ - name: INCLUSTER_CLIENT_BURST\n+ value: \"100\"\n+ - name: GODEBUG\n+ value: x509sha1=1\n+ - name: CSI_NAMESPACE\n+ valueFrom:\n+ fieldRef:\n+ fieldPath: metadata.namespace\n+ volumeMounts:\n+ - mountPath: /etc/cloud\n+ name: vsphere-config-volume\n+ readOnly: true\n+ - name: csi-provisioner\n+ image: k8s.gcr.io/sig-storage/csi-provisioner:v3.4.0\n+ args:\n+ - \"--v=4\"\n+ - \"--timeout=300s\"\n+ - \"--csi-address=$(ADDRESS)\"\n+ - \"--kube-api-qps=100\"\n+ - \"--kube-api-burst=100\"\n+ - \"--leader-election\"\n+ - \"--leader-election-lease-duration=120s\"\n+ - \"--leader-election-renew-deadline=60s\"\n+ - \"--leader-election-retry-period=30s\"\n+ - \"--default-fstype=ext4\"\n+ # needed only for topology aware setup\n+ #- \"--feature-gates=Topology=true\"\n+ #- \"--strict-topology\"\n+ env:\n+ - name: ADDRESS\n+ value: /csi/csi.sock\n+ volumeMounts:\n+ - mountPath: /csi\n+ name: socket-dir\n+ - name: csi-snapshotter\n+ image: k8s.gcr.io/sig-storage/csi-snapshotter:v6.2.1\n+ args:\n+ - \"--v=4\"\n+ - \"--kube-api-qps=100\"\n+ - \"--kube-api-burst=100\"\n+ - \"--timeout=300s\"\n+ - \"--csi-address=$(ADDRESS)\"\n+ - \"--leader-election\"\n+ - \"--leader-election-lease-duration=120s\"\n+ - \"--leader-election-renew-deadline=60s\"\n+ - \"--leader-election-retry-period=30s\"\n+ env:\n+ - name: ADDRESS\n+ value: /csi/csi.sock\n+ volumeMounts:\n+ - mountPath: /csi\n+ name: socket-dir\n+ volumes:\n+ - name: vsphere-config-volume\n+ secret:\n+ secretName: vsphere-config-secret\n+ - name: socket-dir\n+ emptyDir: {}\n+---\n+kind: DaemonSet\n+apiVersion: apps/v1\n+metadata:\n+ name: vsphere-csi-node\n+ namespace: vmware-system-csi\n+spec:\n+ selector:\n+ matchLabels:\n+ app: vsphere-csi-node\n+ updateStrategy:\n+ type: \"RollingUpdate\"\n+ rollingUpdate:\n+ maxUnavailable: 1\n+ template:\n+ metadata:\n+ labels:\n+ app: vsphere-csi-node\n+ role: vsphere-csi\n+ spec:\n+ priorityClassName: system-node-critical\n+ nodeSelector:\n+ kubernetes.io/os: linux\n+ serviceAccountName: vsphere-csi-node\n+ hostNetwork: true\n+ dnsPolicy: \"ClusterFirstWithHostNet\"\n+ containers:\n+ - name: node-driver-registrar\n+ image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.7.0\n+ args:\n+ - \"--v=5\"\n+ - \"--csi-address=$(ADDRESS)\"\n+ - \"--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)\"\n+ env:\n+ - name: ADDRESS\n+ value: /csi/csi.sock\n+ - name: DRIVER_REG_SOCK_PATH\n+ value: /var/lib/kubelet/plugins/csi.vsphere.vmware.com/csi.sock\n+ volumeMounts:\n+ - name: plugin-dir\n+ mountPath: /csi\n+ - name: registration-dir\n+ mountPath: /registration\n+ livenessProbe:\n+ exec:\n+ command:\n+ - /csi-node-driver-registrar\n+ - --kubelet-registration-path=/var/lib/kubelet/plugins/csi.vsphere.vmware.com/csi.sock\n+ - --mode=kubelet-registration-probe\n+ initialDelaySeconds: 3\n+ - name: vsphere-csi-node\n+ image: gcr.io/cloud-provider-vsphere/csi/release/driver:v3.0.0\n+ args:\n+ - \"--fss-name=internal-feature-states.csi.vsphere.vmware.com\"\n+ - \"--fss-namespace=$(CSI_NAMESPACE)\"\n+ imagePullPolicy: \"Always\"\n+ env:\n+ - name: NODE_NAME\n+ valueFrom:\n+ fieldRef:\n+ fieldPath: spec.nodeName\n+ - name: CSI_ENDPOINT\n+ value: unix:///csi/csi.sock\n+ - name: MAX_VOLUMES_PER_NODE\n+ value: \"59\" # Maximum number of volumes that controller can publish to the node. If value is not set or zero Kubernetes decide how many volumes can be published by the controller to the node.\n+ - name: X_CSI_MODE\n+ value: \"node\"\n+ - name: X_CSI_SPEC_REQ_VALIDATION\n+ value: \"false\"\n+ - name: X_CSI_SPEC_DISABLE_LEN_CHECK\n+ value: \"true\"\n+ - name: LOGGER_LEVEL\n+ value: \"PRODUCTION\" # Options: DEVELOPMENT, PRODUCTION\n+ - name: GODEBUG\n+ value: x509sha1=1\n+ - name: CSI_NAMESPACE\n+ valueFrom:\n+ fieldRef:\n+ fieldPath: metadata.namespace\n+ - name: NODEGETINFO_WATCH_TIMEOUT_MINUTES\n+ value: \"1\"\n+ securityContext:\n+ privileged: true\n+ capabilities:\n+ add: [\"SYS_ADMIN\"]\n+ allowPrivilegeEscalation: true\n+ volumeMounts:\n+ - name: plugin-dir\n+ mountPath: /csi\n+ - name: pods-mount-dir\n+ mountPath: /var/lib/kubelet\n+ # needed so that any mounts setup inside this container are\n+ # propagated back to the host machine.\n+ mountPropagation: \"Bidirectional\"\n+ - name: device-dir\n+ mountPath: /dev\n+ - name: blocks-dir\n+ mountPath: /sys/block\n+ - name: sys-devices-dir\n+ mountPath: /sys/devices\n+ ports:\n+ - name: healthz\n+ containerPort: 9808\n+ protocol: TCP\n+ livenessProbe:\n+ httpGet:\n+ path: /healthz\n+ port: healthz\n+ initialDelaySeconds: 10\n+ timeoutSeconds: 5\n+ periodSeconds: 5\n+ failureThreshold: 3\n+ - name: liveness-probe\n+ image: k8s.gcr.io/sig-storage/livenessprobe:v2.9.0\n+ args:\n+ - \"--v=4\"\n+ - \"--csi-address=/csi/csi.sock\"\n+ volumeMounts:\n+ - name: plugin-dir\n+ mountPath: /csi\n+ volumes:\n+ - name: registration-dir\n+ hostPath:\n+ path: /var/lib/kubelet/plugins_registry\n+ type: Directory\n+ - name: plugin-dir\n+ hostPath:\n+ path: /var/lib/kubelet/plugins/csi.vsphere.vmware.com\n+ type: DirectoryOrCreate\n+ - name: pods-mount-dir\n+ hostPath:\n+ path: /var/lib/kubelet\n+ type: Directory\n+ - name: device-dir\n+ hostPath:\n+ path: /dev\n+ - name: blocks-dir\n+ hostPath:\n+ path: /sys/block\n+ type: Directory\n+ - name: sys-devices-dir\n+ hostPath:\n+ path: /sys/devices\n+ type: Directory\n+ tolerations:\n+ - effect: NoExecute\n+ operator: Exists\n+ - effect: NoSchedule\n+ operator: Exists\n+---\n+kind: DaemonSet\n+apiVersion: apps/v1\n+metadata:\n+ name: vsphere-csi-node-windows\n+ namespace: vmware-system-csi\n+spec:\n+ selector:\n+ matchLabels:\n+ app: vsphere-csi-node-windows\n+ updateStrategy:\n+ type: RollingUpdate\n+ rollingUpdate:\n+ maxUnavailable: 1\n+ template:\n+ metadata:\n+ labels:\n+ app: vsphere-csi-node-windows\n+ role: vsphere-csi-windows\n+ spec:\n+ priorityClassName: system-node-critical\n+ nodeSelector:\n+ kubernetes.io/os: windows\n+ serviceAccountName: vsphere-csi-node\n+ containers:\n+ - name: node-driver-registrar\n+ image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.7.0\n+ args:\n+ - \"--v=5\"\n+ - \"--csi-address=$(ADDRESS)\"\n+ - \"--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)\"\n+ env:\n+ - name: ADDRESS\n+ value: 'unix://C:\\\\csi\\\\csi.sock'\n+ - name: DRIVER_REG_SOCK_PATH\n+ value: 'C:\\\\var\\\\lib\\\\kubelet\\\\plugins\\\\csi.vsphere.vmware.com\\\\csi.sock'\n+ volumeMounts:\n+ - name: plugin-dir\n+ mountPath: /csi\n+ - name: registration-dir\n+ mountPath: /registration\n+ livenessProbe:\n+ exec:\n+ command:\n+ - /csi-node-driver-registrar.exe\n+ - --kubelet-registration-path=C:\\\\var\\\\lib\\\\kubelet\\\\plugins\\\\csi.vsphere.vmware.com\\\\csi.sock\n+ - --mode=kubelet-registration-probe\n+ initialDelaySeconds: 3\n+ - name: vsphere-csi-node\n+ image: gcr.io/cloud-provider-vsphere/csi/release/driver:v3.0.0\n+ args:\n+ - \"--fss-name=internal-feature-states.csi.vsphere.vmware.com\"\n+ - \"--fss-namespace=$(CSI_NAMESPACE)\"\n+ imagePullPolicy: \"Always\"\n+ env:\n+ - name: NODE_NAME\n+ valueFrom:\n+ fieldRef:\n+ apiVersion: v1\n+ fieldPath: spec.nodeName \n+ - name: CSI_ENDPOINT\n+ value: 'unix://C:\\\\csi\\\\csi.sock'\n+ - name: MAX_VOLUMES_PER_NODE\n+ value: \"59\" # Maximum number of volumes that controller can publish to the node. If value is not set or zero Kubernetes decide how many volumes can be published by the controller to the node.\n+ - name: X_CSI_MODE\n+ value: node\n+ - name: X_CSI_SPEC_REQ_VALIDATION\n+ value: 'false'\n+ - name: X_CSI_SPEC_DISABLE_LEN_CHECK\n+ value: \"true\"\n+ - name: LOGGER_LEVEL\n+ value: \"PRODUCTION\" # Options: DEVELOPMENT, PRODUCTION\n+ - name: X_CSI_LOG_LEVEL\n+ value: DEBUG\n+ - name: CSI_NAMESPACE\n+ valueFrom:\n+ fieldRef:\n+ fieldPath: metadata.namespace\n+ - name: NODEGETINFO_WATCH_TIMEOUT_MINUTES\n+ value: \"1\"\n+ volumeMounts:\n+ - name: plugin-dir\n+ mountPath: 'C:\\csi'\n+ - name: pods-mount-dir\n+ mountPath: 'C:\\var\\lib\\kubelet' \n+ - name: csi-proxy-volume-v1\n+ mountPath: \\\\.\\pipe\\csi-proxy-volume-v1\n+ - name: csi-proxy-filesystem-v1\n+ mountPath: \\\\.\\pipe\\csi-proxy-filesystem-v1\n+ - name: csi-proxy-disk-v1\n+ mountPath: \\\\.\\pipe\\csi-proxy-disk-v1 \n+ - name: csi-proxy-system-v1alpha1\n+ mountPath: \\\\.\\pipe\\csi-proxy-system-v1alpha1\n+ ports:\n+ - name: healthz\n+ containerPort: 9808\n+ protocol: TCP\n+ livenessProbe:\n+ httpGet:\n+ path: /healthz\n+ port: healthz\n+ initialDelaySeconds: 10\n+ timeoutSeconds: 5\n+ periodSeconds: 5\n+ failureThreshold: 3\n+ - name: liveness-probe\n+ image: k8s.gcr.io/sig-storage/livenessprobe:v2.9.0\n+ args:\n+ - \"--v=4\"\n+ - \"--csi-address=/csi/csi.sock\"\n+ volumeMounts:\n+ - name: plugin-dir\n+ mountPath: /csi\n+ volumes:\n+ - name: registration-dir\n+ hostPath:\n+ path: 'C:\\var\\lib\\kubelet\\plugins_registry\\'\n+ type: Directory\n+ - name: plugin-dir\n+ hostPath:\n+ path: 'C:\\var\\lib\\kubelet\\plugins\\csi.vsphere.vmware.com\\'\n+ type: DirectoryOrCreate\n+ - name: pods-mount-dir\n+ hostPath:\n+ path: \\var\\lib\\kubelet\n+ type: Directory\n+ - name: csi-proxy-disk-v1\n+ hostPath:\n+ path: \\\\.\\pipe\\csi-proxy-disk-v1\n+ type: ''\n+ - name: csi-proxy-volume-v1\n+ hostPath:\n+ path: \\\\.\\pipe\\csi-proxy-volume-v1\n+ type: ''\n+ - name: csi-proxy-filesystem-v1\n+ hostPath:\n+ path: \\\\.\\pipe\\csi-proxy-filesystem-v1\n+ type: ''\n+ - name: csi-proxy-system-v1alpha1\n+ hostPath:\n+ path: \\\\.\\pipe\\csi-proxy-system-v1alpha1\n+ type: ''\n+ tolerations:\n+ - effect: NoExecute\n+ operator: Exists\n+ - effect: NoSchedule\n+ operator: Exists\n\\ No newline at end of file" }, { "sha": "0ba9931c7bf5a22da94dd6264a7a2c462b4d8c1a", "filename": "eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/vsphere-csi-externalsecrets.yaml", "status": "added", "additions": 37, "deletions": 0, "changes": 37, "blob_url": "https://github.com/mikemcd3912/eks-anywhere-addons/blob/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-csi-externalsecrets.yaml", "raw_url": "https://github.com/mikemcd3912/eks-anywhere-addons/raw/919469f6ec8827550101162b3710347d1ee8a735/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-csi-externalsecrets.yaml", "contents_url": "https://api.github.com/repos/mikemcd3912/eks-anywhere-addons/contents/eks-anywhere-vsphere%2FAddons%2FCore%2Fstorage-driver%2Fvmware-csi%2Fvsphere-csi-externalsecrets.yaml?ref=919469f6ec8827550101162b3710347d1ee8a735", "patch": "@@ -0,0 +1,37 @@\n+---\n+apiVersion: external-secrets.io/v1beta1\n+kind: ExternalSecret\n+metadata:\n+ name: vsphere-cloud-config\n+ namespace: kube-system\n+ labels:\n+ vsphere-cpi-infra: config\n+ component: cloud-controller-manager\n+spec:\n+ refreshInterval: 1m\n+ secretStoreRef:\n+ name: eksa-secret-store #The secret store name we have just created.\n+ kind: ClusterSecretStore\n+ target:\n+ name: vsphere.conf # Secret name in k8s\n+ data:\n+ - secretKey: vsphere.conf # which key it's going to be stored in\n+ remoteRef:\n+ key: vsphere.conf # External secret name goes here\n+---\n+apiVersion: external-secrets.io/v1beta1\n+kind: ExternalSecret\n+metadata:\n+ name: vsphere-config-secret\n+ namespace: vmware-system-csi\n+spec:\n+ refreshInterval: 1m\n+ secretStoreRef:\n+ name: eksa-secret-store #The secret store name we have just created.\n+ kind: ClusterSecretStore\n+ target:\n+ name: vsphere-config-secret # Secret name in k8s\n+ data:\n+ - secretKey: csi-vsphere.conf # which key it's going to be stored in\n+ remoteRef:\n+ key: csi-vsphere.conf # External secret name goes here\n\\ No newline at end of file" } ] \ No newline at end of file From 192aec56bbfc42f9e520f487c4688acc33881738 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 23:24:41 +0000 Subject: [PATCH 023/104] remove txt file --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 01f519b1..23cef2da 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq '.[]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq '.[].filename') # Move updated files over to dev branch git fetch --all From 600d31cbdc08125c1bd62d1dcc557747ae899440 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 23:28:12 +0000 Subject: [PATCH 024/104] Parsing JSON --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 23cef2da..bfa7e0ad 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq '.[].filename') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[]') # Move updated files over to dev branch git fetch --all From 7ab370553c51ce9b2e1c213fe6cab402fbee0cf1 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 23:36:39 +0000 Subject: [PATCH 025/104] New Parse Strategy --- .github/workflows/new-pull-request.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index bfa7e0ad..14964a3c 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,9 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -s ) + + echo $files # Move updated files over to dev branch git fetch --all From 0bffd29bfecd69c1ddb46251e591c7b4e32b2cc0 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 23:39:12 +0000 Subject: [PATCH 026/104] New Parse Strategy --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 14964a3c..9996cc61 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -s ) + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r ) echo $files From 8ad2df573d7bbde2cb46a8edd0870cd778cdaf23 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 23:40:50 +0000 Subject: [PATCH 027/104] New Parse Strategy 3 --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 9996cc61..1dd7b258 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r ) + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[]') echo $files From f63d968f3e6e74de6b28ccf6776602581b5097d2 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 11 Jan 2024 23:44:12 +0000 Subject: [PATCH 028/104] New Parse Strategy 4 --- .github/workflows/new-pull-request.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 1dd7b258..14f06cec 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -s '.[]') echo $files @@ -39,8 +39,8 @@ jobs: for item in $files; do echo "$item" - status=$(echo $item | jq -r '.status') - filename=$(echo $item | jq -r '.filename') + status=$(echo $item | jq '.status') + filename=$(echo $item | jq '.filename') echo "Filename: $filename is Status: $status" From ac8668ca52dcd3b409cefbc13f8181b614644ed1 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 16:24:12 +0000 Subject: [PATCH 029/104] Compact JQ option --- .github/workflows/new-pull-request.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 14f06cec..e4c4e8b2 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -s '.[]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -c -r '.[]') echo $files @@ -39,8 +39,8 @@ jobs: for item in $files; do echo "$item" - status=$(echo $item | jq '.status') - filename=$(echo $item | jq '.filename') + status=$(echo $item | jq -r '.status') + filename=$(echo $item | jq -r '.filename') echo "Filename: $filename is Status: $status" From f81ee462570a917f1a9b4af4cdf6783dded31bb5 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 16:27:12 +0000 Subject: [PATCH 030/104] Parsing Item troubleshooting --- .github/workflows/new-pull-request.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index e4c4e8b2..4243e021 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -39,12 +39,12 @@ jobs: for item in $files; do echo "$item" - status=$(echo $item | jq -r '.status') - filename=$(echo $item | jq -r '.filename') + status=$(echo $item | jq '.status') + filename=$(echo $item | jq '.filename') echo "Filename: $filename is Status: $status" - if [ status != deleted ]; then + if [ status != removed ]; then git checkout pr -- $filename git add $filename echo "Moving $filename" From 1688d6b7ac1bdf8d48b40956cf13ce4f6c49763b Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 16:31:12 +0000 Subject: [PATCH 031/104] Parsing Item Compact --- .github/workflows/new-pull-request.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 4243e021..00184fef 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -27,8 +27,6 @@ jobs: # Pull files down into a filename array files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -c -r '.[]') - echo $files - # Move updated files over to dev branch git fetch --all git config --local user.email "dev@null" @@ -39,8 +37,8 @@ jobs: for item in $files; do echo "$item" - status=$(echo $item | jq '.status') - filename=$(echo $item | jq '.filename') + status=$(echo $item | jq -c '.status') + filename=$(echo $item | jq -c '.filename') echo "Filename: $filename is Status: $status" From 3f440a3b2793dc634c0371aa0e715b14d85526cf Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 16:33:39 +0000 Subject: [PATCH 032/104] quotes around Parse Item --- .github/workflows/new-pull-request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 00184fef..455bcf8d 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -37,8 +37,8 @@ jobs: for item in $files; do echo "$item" - status=$(echo $item | jq -c '.status') - filename=$(echo $item | jq -c '.filename') + status=$(echo "$item" | jq -r '.status') + filename=$(echo "$item" | jq -r '.filename') echo "Filename: $filename is Status: $status" From 545cfed2f7511fbcc4f415121571453104d7c461 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 16:36:10 +0000 Subject: [PATCH 033/104] quotes around Parse Item --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 455bcf8d..60ea63c8 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -c -r '.[]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -c '.[]') # Move updated files over to dev branch git fetch --all From 1dfbb88d940a537de323cbf7a03f7c6d9e21217e Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 16:43:49 +0000 Subject: [PATCH 034/104] Troubleshooting item extraction --- .github/workflows/new-pull-request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 60ea63c8..30448c18 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -c '.[]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -c -r '.[]') # Move updated files over to dev branch git fetch --all @@ -35,7 +35,7 @@ jobs: git checkout developer_branch git pull - for item in $files; do + for item in "$files"; do echo "$item" status=$(echo "$item" | jq -r '.status') filename=$(echo "$item" | jq -r '.filename') From dcf25f10ab6d04eefbf8b8a0e1627f9a2e6599e9 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 16:53:34 +0000 Subject: [PATCH 035/104] Troubleshooting item extraction 2 --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 30448c18..702cfb0e 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -c -r '.[]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[]') # Move updated files over to dev branch git fetch --all From 83c49f5e3069b148db762880dbdda8902d50980e Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 16:56:09 +0000 Subject: [PATCH 036/104] Troubleshooting item extraction 3 --- .github/workflows/new-pull-request.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 702cfb0e..012a93ee 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -42,7 +42,7 @@ jobs: echo "Filename: $filename is Status: $status" - if [ status != removed ]; then + if [ "$status" != removed ]; then git checkout pr -- $filename git add $filename echo "Moving $filename" @@ -53,8 +53,7 @@ jobs: done # Find Namespace File(s) in uploads list and generate/update configmap for each - for file in $files [LEFT OFF HERE] - do + for file in $files; do filename=$file.filename echo "Filename = $filename" From 6e5567f14dfe6dff33a077eb44488b9afe10c856 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 17:00:08 +0000 Subject: [PATCH 037/104] Troubleshooting item extraction 3 --- .github/workflows/new-pull-request.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 012a93ee..65bd2bdc 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -27,6 +27,9 @@ jobs: # Pull files down into a filename array files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[]') + echo $files + echo "Files in Quotes: $files" + # Move updated files over to dev branch git fetch --all git config --local user.email "dev@null" From a5891eceb5128417b8d48248f2e963b09d945b87 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 17:08:39 +0000 Subject: [PATCH 038/104] Troubleshooting item extraction 4 --- .github/workflows/new-pull-request.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 65bd2bdc..52a83c3e 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,10 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[]') - - echo $files - echo "Files in Quotes: $files" + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -c -r '.[]') # Move updated files over to dev branch git fetch --all @@ -38,7 +35,7 @@ jobs: git checkout developer_branch git pull - for item in "$files"; do + for item in $files; do echo "$item" status=$(echo "$item" | jq -r '.status') filename=$(echo "$item" | jq -r '.filename') From fe1c2bad954bcfc6d6c473808c8368b04f8ebeeb Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 17:13:16 +0000 Subject: [PATCH 039/104] Array Access --- .github/workflows/new-pull-request.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 52a83c3e..69f27d98 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -34,6 +34,8 @@ jobs: # fetch most recent update to dev git checkout developer_branch git pull + + echo "$files[0]" for item in $files; do echo "$item" From 91c532693b8e806e796fb417fb6cb810a5137720 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 17:16:44 +0000 Subject: [PATCH 040/104] Array repair --- .github/workflows/new-pull-request.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 69f27d98..d8e54544 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -38,7 +38,6 @@ jobs: echo "$files[0]" for item in $files; do - echo "$item" status=$(echo "$item" | jq -r '.status') filename=$(echo "$item" | jq -r '.filename') echo "Filename: $filename is Status: $status" From 76dcd7ecb800e58711e7ec034f8a8bcc24fd817e Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 17:22:12 +0000 Subject: [PATCH 041/104] Touple test --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index d8e54544..782ce57e 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -c -r '.[]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[].filename, .[].status') # Move updated files over to dev branch git fetch --all From d0e7975a7e973ca989a0907993118fc063f042b9 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 17:25:43 +0000 Subject: [PATCH 042/104] Touple test 2 --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 782ce57e..0e081f4c 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[].filename, .[].status') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq '.[].filename, .[].status') # Move updated files over to dev branch git fetch --all From f2879b7af3413630d55260a145fdd538beaa60b7 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 17:26:49 +0000 Subject: [PATCH 043/104] Touple test 3 --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 0e081f4c..5d979951 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq '.[].filename, .[].status') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -c '.[].filename, .[].status') # Move updated files over to dev branch git fetch --all From d5483364811eacda64acd9e9dbf043c57758c38f Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 17:31:22 +0000 Subject: [PATCH 044/104] Raw output0 option test --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 5d979951..02f5d64e 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -c '.[].filename, .[].status') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -raw-output0 '.[]') # Move updated files over to dev branch git fetch --all From ae6e2a24b14b872d575b52b01ead3ade27b17644 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 17:33:37 +0000 Subject: [PATCH 045/104] --raw-output0 option test --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 02f5d64e..d524f0a5 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -raw-output0 '.[]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq --raw-output0 '.[]') # Move updated files over to dev branch git fetch --all From 435562a8b3a7f30c1396f5e15fbd567a2234f2fc Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 17:41:09 +0000 Subject: [PATCH 046/104] Name and Status Arrays --- .github/workflows/new-pull-request.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index d524f0a5..2681cfd4 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq --raw-output0 '.[]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '[.[].filename, .[].status]') # Move updated files over to dev branch git fetch --all @@ -35,11 +35,11 @@ jobs: git checkout developer_branch git pull - echo "$files[0]" + echo "$files" for item in $files; do - status=$(echo "$item" | jq -r '.status') - filename=$(echo "$item" | jq -r '.filename') + status=$item[1] + filename=$item[0] echo "Filename: $filename is Status: $status" From 3027041bfbc6b587da9bed42830c0a32b80347fc Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 17:43:37 +0000 Subject: [PATCH 047/104] Name and Status Arrays 2 --- .github/workflows/new-pull-request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 2681cfd4..dfa36cc2 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -38,8 +38,8 @@ jobs: echo "$files" for item in $files; do - status=$item[1] - filename=$item[0] + status=${item[1]} + filename=${item[0]} echo "Filename: $filename is Status: $status" From 67b094b21bf2f053f912e75faff6357bd7f680cf Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 17:44:50 +0000 Subject: [PATCH 048/104] Name and Status Arrays 3 --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index dfa36cc2..d8c3cf1a 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '[.[].filename, .[].status]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq '[.[].filename, .[].status]') # Move updated files over to dev branch git fetch --all From bd3e9d64f59b4394b9b597a4a0a3399168b115f4 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 17:58:07 +0000 Subject: [PATCH 049/104] Remove initial Array parse --- .github/workflows/new-pull-request.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index d8c3cf1a..9398aada 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq '[.[].filename, .[].status]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files") # Move updated files over to dev branch git fetch --all @@ -35,11 +35,11 @@ jobs: git checkout developer_branch git pull - echo "$files" for item in $files; do - status=${item[1]} - filename=${item[0]} + echo "$item" + status=$(echo "$item" | jq -r '.status') + filename=$(echo "$item" | jq -r '.filename') echo "Filename: $filename is Status: $status" From d662a54461084da6e5507e816bd8f8044f127e84 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 18:02:23 +0000 Subject: [PATCH 050/104] Initial Array parse --- .github/workflows/new-pull-request.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 9398aada..1fd4ac49 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,9 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files") + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[]') + + echo "$files" # Move updated files over to dev branch git fetch --all @@ -37,7 +39,6 @@ jobs: for item in $files; do - echo "$item" status=$(echo "$item" | jq -r '.status') filename=$(echo "$item" | jq -r '.filename') echo "Filename: $filename is Status: $status" From dff9c7181e7bb83601c47735d160e52f7bab45e9 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 20:42:59 +0000 Subject: [PATCH 051/104] Array Construction from String --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 1fd4ac49..eedc1a7c 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r '.[]') + files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r ['.[]']) echo "$files" From c231982012fed70961e9eb6e91e2867125ed3762 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 20:46:42 +0000 Subject: [PATCH 052/104] Parse object --- .github/workflows/new-pull-request.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index eedc1a7c..9df51a99 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -27,7 +27,7 @@ jobs: # Pull files down into a filename array files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r ['.[]']) - echo "$files" + # echo "$files" # Move updated files over to dev branch git fetch --all @@ -39,8 +39,9 @@ jobs: for item in $files; do - status=$(echo "$item" | jq -r '.status') - filename=$(echo "$item" | jq -r '.filename') + echo $item + status=$(echo $item | jq '.status') + filename=$(echo "$item" | jq '.filename') echo "Filename: $filename is Status: $status" From fece4c6994ca9f0ddba0a4572e5eab58de4b5a9c Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 20:50:00 +0000 Subject: [PATCH 053/104] api test --- .github/workflows/new-pull-request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 9df51a99..532c2437 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -26,7 +26,7 @@ jobs: run: | # Pull files down into a filename array files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r ['.[]']) - + echo "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" # echo "$files" # Move updated files over to dev branch @@ -39,7 +39,7 @@ jobs: for item in $files; do - echo $item + # echo $item status=$(echo $item | jq '.status') filename=$(echo "$item" | jq '.filename') echo "Filename: $filename is Status: $status" From 7ad3fd767fb2b35ee121b537cafe9937b8d7aebb Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 21:04:44 +0000 Subject: [PATCH 054/104] Fix array creation --- .github/workflows/new-pull-request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 532c2437..8d9c74a7 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -25,7 +25,7 @@ jobs: id: find-namespace-yaml run: | # Pull files down into a filename array - files=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -r ['.[]']) + readarray -t files < <(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -c '.[]') echo "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" # echo "$files" @@ -39,7 +39,7 @@ jobs: for item in $files; do - # echo $item + echo $item status=$(echo $item | jq '.status') filename=$(echo "$item" | jq '.filename') echo "Filename: $filename is Status: $status" From de7f5f2aa7a3a873b28d4911505034a9079eeeca Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 21:07:42 +0000 Subject: [PATCH 055/104] Troubleshoot Array elements --- .github/workflows/new-pull-request.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 8d9c74a7..2cb0d0eb 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -27,7 +27,8 @@ jobs: # Pull files down into a filename array readarray -t files < <(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -c '.[]') echo "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" - # echo "$files" + echo "first file: ${files[1]}" + echo "" # Move updated files over to dev branch git fetch --all @@ -39,8 +40,8 @@ jobs: for item in $files; do - echo $item - status=$(echo $item | jq '.status') + echo "$item" + status=$(echo "$item" | jq '.status') filename=$(echo "$item" | jq '.filename') echo "Filename: $filename is Status: $status" From 2031af0bf247879225b9afa3002415760bfeed83 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 21:16:01 +0000 Subject: [PATCH 056/104] Fix loop --- .github/workflows/new-pull-request.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 2cb0d0eb..54b621cc 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -39,12 +39,11 @@ jobs: git pull - for item in $files; do - echo "$item" - status=$(echo "$item" | jq '.status') - filename=$(echo "$item" | jq '.filename') + for item in "${files[@]}"; do + status=$(echo "$item" | jq -r '.status') + filename=$(echo "$item" | jq -r '.filename') echo "Filename: $filename is Status: $status" - + done if [ "$status" != removed ]; then git checkout pr -- $filename @@ -57,7 +56,7 @@ jobs: done # Find Namespace File(s) in uploads list and generate/update configmap for each - for file in $files; do + for file in ${files[@]}; do filename=$file.filename echo "Filename = $filename" From 009a500239e7780caf50d3db0155d35dd7c53eb1 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 21:17:54 +0000 Subject: [PATCH 057/104] Removing extra done --- .github/workflows/new-pull-request.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 54b621cc..46371c32 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -43,7 +43,6 @@ jobs: status=$(echo "$item" | jq -r '.status') filename=$(echo "$item" | jq -r '.filename') echo "Filename: $filename is Status: $status" - done if [ "$status" != removed ]; then git checkout pr -- $filename From 288d24d35dafbbf7f265a50d36a30d655d2377b9 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 22:25:45 +0000 Subject: [PATCH 058/104] Update workflow, update namespace search --- .github/workflows/new-pull-request.yaml | 30 ++++++++++--------------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 46371c32..d0b0b9c1 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -38,7 +38,7 @@ jobs: git checkout developer_branch git pull - + # Remove Deleted Files, copy over added or modified files for item in "${files[@]}"; do status=$(echo "$item" | jq -r '.status') filename=$(echo "$item" | jq -r '.filename') @@ -48,29 +48,20 @@ jobs: git checkout pr -- $filename git add $filename echo "Moving $filename" - else - echo "Deleting $filename" - rm $filename - fi - done - - # Find Namespace File(s) in uploads list and generate/update configmap for each - for file in ${files[@]}; do - filename=$file.filename - echo "Filename = $filename" - # Parse namespace data - if [ $(echo "$filename" | grep -c "namespace.yaml") ]; then + # Create ConfigMap for each file's partner folder + # Parse namespace data subdirectory=$(dirname $filename) echo "Sub Directory = $subdirectory" # get namespace from dev branch directory where the updated file is being placed - if [ -f "${subdirectory}/namespace.yaml" ]; then - namespace_file="${subdirectory}/namespace.yaml" - echo "namespace file = $namespace_file" + namespace_file=$(find . -name "*namespace*") + echo "namespace file = $namespace_file" + + if [ -f $namespace_file ]; then namespace_name=$(grep -E '^\s*metadata:\s*$|^\s*name:\s*' "$namespace_file" | awk -F':' '{gsub(/ /, "", $2); print $2}') else - echo "No Namespace file found in existing subdirectory" + echo "No Namespace file found" exit 200 fi @@ -105,8 +96,11 @@ jobs: exit 100 fi else - echo "Not a namespace.yaml file" + echo "Deleting $filename" + rm $filename fi + + done git commit -m "Adding new and changed files for PR_${{ github.event.pull_request.number }}" From c10543e83c7baa8894101627efd845bce6c18c20 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 22:29:37 +0000 Subject: [PATCH 059/104] Fix finder subdirectory --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index d0b0b9c1..1deed6c2 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -55,7 +55,7 @@ jobs: echo "Sub Directory = $subdirectory" # get namespace from dev branch directory where the updated file is being placed - namespace_file=$(find . -name "*namespace*") + namespace_file=$(find $subdirectory -name "*namespace*") echo "namespace file = $namespace_file" if [ -f $namespace_file ]; then From 61ddd58d6c2017eaa2adc424a1053449191c82cc Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 22:35:58 +0000 Subject: [PATCH 060/104] Move files before configmap processing --- .github/workflows/new-pull-request.yaml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 1deed6c2..e0f54cf0 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -48,8 +48,18 @@ jobs: git checkout pr -- $filename git add $filename echo "Moving $filename" - + else + echo "Deleting $filename" + rm $filename + fi + done + + # Create ConfigMap for each file's partner folder + for item in "${files[@]}"; do + status=$(echo "$item" | jq -r '.status') + filename=$(echo "$item" | jq -r '.filename') + if [ "$status" != removed ]; then # Parse namespace data subdirectory=$(dirname $filename) echo "Sub Directory = $subdirectory" @@ -95,12 +105,7 @@ jobs: echo "No Namespace found, Invalid namespace file" exit 100 fi - else - echo "Deleting $filename" - rm $filename - fi - - + fi done git commit -m "Adding new and changed files for PR_${{ github.event.pull_request.number }}" From a7c84d821c5ef3463cad4a12fe1ac500e1a6d0dd Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 22:48:08 +0000 Subject: [PATCH 061/104] Handling file renames --- .github/workflows/new-pull-request.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index e0f54cf0..eb53ab82 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -44,7 +44,12 @@ jobs: filename=$(echo "$item" | jq -r '.filename') echo "Filename: $filename is Status: $status" - if [ "$status" != removed ]; then + if [ "$status == renamed" ]; then + git checkout pr -- $filename + git add $filename + rm $(echo "$item" | jq -r '.previous_filename') + echo "Renaming $filename" + else if [ "$status" != removed ]; then git checkout pr -- $filename git add $filename echo "Moving $filename" From a18c516bb86483cbe4d2d2af1f5998056ba02cb1 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 22:50:33 +0000 Subject: [PATCH 062/104] Fix Elif --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index eb53ab82..0e95b29d 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -49,7 +49,7 @@ jobs: git add $filename rm $(echo "$item" | jq -r '.previous_filename') echo "Renaming $filename" - else if [ "$status" != removed ]; then + elif [ "$status" != removed ]; then git checkout pr -- $filename git add $filename echo "Moving $filename" From 25e0ae5681737d64c706ddaa20dea5d16b9c929d Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 22:55:09 +0000 Subject: [PATCH 063/104] Update to IF conditions --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 0e95b29d..ecdfeaca 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -44,7 +44,7 @@ jobs: filename=$(echo "$item" | jq -r '.filename') echo "Filename: $filename is Status: $status" - if [ "$status == renamed" ]; then + if [ "$status" == renamed ]; then git checkout pr -- $filename git add $filename rm $(echo "$item" | jq -r '.previous_filename') From d03cea14abeac3b751023934b3b2f238da777503 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 22:58:12 +0000 Subject: [PATCH 064/104] Update trigger for commit reversals --- .github/workflows/close-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/close-pull-request.yaml b/.github/workflows/close-pull-request.yaml index 7bb19568..7d4d610f 100644 --- a/.github/workflows/close-pull-request.yaml +++ b/.github/workflows/close-pull-request.yaml @@ -1,7 +1,7 @@ name: PR Closed - purging developer_branch on: pull_request_target: - branches: [main] + branches: [githubActions] types: [closed] paths-ignore: - 'Validated_Partners/**' From a492a369529c7b79bf8ea230dd5635135550701a Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 23:06:21 +0000 Subject: [PATCH 065/104] Fix configmap locations --- .github/workflows/new-pull-request.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index ecdfeaca..6dcebb87 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -72,6 +72,7 @@ jobs: # get namespace from dev branch directory where the updated file is being placed namespace_file=$(find $subdirectory -name "*namespace*") echo "namespace file = $namespace_file" + namespace_file_subdirectory=$(dirname $namespace_file) if [ -f $namespace_file ]; then namespace_name=$(grep -E '^\s*metadata:\s*$|^\s*name:\s*' "$namespace_file" | awk -F':' '{gsub(/ /, "", $2); print $2}') @@ -102,8 +103,8 @@ jobs: echo $subdirectory echo $config_map_file - mkdir -p ./$subdirectory/ - mv "$config_map_file" ./$subdirectory/ + mkdir -p ./$namespace_file_subdirectory/ + mv "$config_map_file" ./$namespace_file_subdirectory/ git add . else From e9b7beff8b5e0ee99771d14fa3f03289b8f9c25b Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 23:35:57 +0000 Subject: [PATCH 066/104] Remove unnecessary console outputs --- .github/workflows/new-pull-request.yaml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 6dcebb87..897cc6e8 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -24,11 +24,8 @@ jobs: - name: Parse Namespace data, Create ConfigMap id: find-namespace-yaml run: | - # Pull files down into a filename array + # Pull file information down into a JSON array readarray -t files < <(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | jq -c '.[]') - echo "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" - echo "first file: ${files[1]}" - echo "" # Move updated files over to dev branch git fetch --all @@ -42,7 +39,6 @@ jobs: for item in "${files[@]}"; do status=$(echo "$item" | jq -r '.status') filename=$(echo "$item" | jq -r '.filename') - echo "Filename: $filename is Status: $status" if [ "$status" == renamed ]; then git checkout pr -- $filename @@ -67,11 +63,9 @@ jobs: if [ "$status" != removed ]; then # Parse namespace data subdirectory=$(dirname $filename) - echo "Sub Directory = $subdirectory" # get namespace from dev branch directory where the updated file is being placed namespace_file=$(find $subdirectory -name "*namespace*") - echo "namespace file = $namespace_file" namespace_file_subdirectory=$(dirname $namespace_file) if [ -f $namespace_file ]; then @@ -82,9 +76,7 @@ jobs: fi if [[ -n $namespace_name ]]; then - echo "$namespace_name" namespace=$(echo $namespace_name | xargs echo -n) - echo $namespace config_map_file="config-map-${{ github.event.pull_request.number }}.yml" echo $config_map_file echo "apiVersion: v1" >> $config_map_file From 93b0c3cdca5f26fd3a7040e5acbb17312399c3e1 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 12 Jan 2024 23:37:51 +0000 Subject: [PATCH 067/104] Remove unnecessary console outputs 2 --- .github/workflows/new-pull-request.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 897cc6e8..2c66f351 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -78,7 +78,6 @@ jobs: if [[ -n $namespace_name ]]; then namespace=$(echo $namespace_name | xargs echo -n) config_map_file="config-map-${{ github.event.pull_request.number }}.yml" - echo $config_map_file echo "apiVersion: v1" >> $config_map_file echo "kind: ConfigMap" >> $config_map_file echo "metadata:" >> $config_map_file @@ -92,8 +91,6 @@ jobs: echo " commitHash: ${{ github.event.pull_request.head.sha }}" >> $config_map_file echo " deployed: \"$(date +%s)\"" >> $config_map_file echo " env: $(echo $subdirectory | cut -f1 -d/ | awk -F- '{print $NF}' )" >> $config_map_file - echo $subdirectory - echo $config_map_file mkdir -p ./$namespace_file_subdirectory/ mv "$config_map_file" ./$namespace_file_subdirectory/ From 38db2264fee50e3c7a7912a2cd66e8ec49c6f687 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Sat, 13 Jan 2024 00:12:22 +0000 Subject: [PATCH 068/104] adding step-up to namespace search --- .github/workflows/new-pull-request.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 2c66f351..f66b1faf 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -63,12 +63,16 @@ jobs: if [ "$status" != removed ]; then # Parse namespace data subdirectory=$(dirname $filename) + namespace_file_subdirectory=$(dirname filename) # get namespace from dev branch directory where the updated file is being placed - namespace_file=$(find $subdirectory -name "*namespace*") - namespace_file_subdirectory=$(dirname $namespace_file) + while [ $(basename $namespace_file_subdirectory) != Partner ] && [ $(basename $namespace_file_subdirectory) != Core ] && [ -z $namespace_file ]; do + namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") + namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) + done if [ -f $namespace_file ]; then + namespace_file_subdirectory=$(dirname $namespace_file) namespace_name=$(grep -E '^\s*metadata:\s*$|^\s*name:\s*' "$namespace_file" | awk -F':' '{gsub(/ /, "", $2); print $2}') else echo "No Namespace file found" From baa82ef9d1939c81ca92fe87e22a8494e5e467c9 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Sat, 13 Jan 2024 00:15:43 +0000 Subject: [PATCH 069/104] adding step-up to namespace search 2 --- .github/workflows/new-pull-request.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index f66b1faf..088b4d46 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -64,9 +64,11 @@ jobs: # Parse namespace data subdirectory=$(dirname $filename) namespace_file_subdirectory=$(dirname filename) + echo $namespace_file_subdirectory # get namespace from dev branch directory where the updated file is being placed - while [ $(basename $namespace_file_subdirectory) != Partner ] && [ $(basename $namespace_file_subdirectory) != Core ] && [ -z $namespace_file ]; do + while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z $namespace_file ]; do + echo $namespace_file_subdirectory namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) done From 82cbe8ca2b6f5b97396fea2c6853e9f1203bb555 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Sat, 13 Jan 2024 00:17:32 +0000 Subject: [PATCH 070/104] adding step-up to namespace search 3 --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 088b4d46..431289e5 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -63,7 +63,7 @@ jobs: if [ "$status" != removed ]; then # Parse namespace data subdirectory=$(dirname $filename) - namespace_file_subdirectory=$(dirname filename) + namespace_file_subdirectory=$(dirname $filename) echo $namespace_file_subdirectory # get namespace from dev branch directory where the updated file is being placed From 8c00267b011fb4ea7785840dc86a00adef7d1235 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Sat, 13 Jan 2024 00:33:58 +0000 Subject: [PATCH 071/104] add troubleshooting output --- .github/workflows/new-pull-request.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 431289e5..078b13f5 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -74,6 +74,7 @@ jobs: done if [ -f $namespace_file ]; then + echo "Namespace File found: $namespace_file" namespace_file_subdirectory=$(dirname $namespace_file) namespace_name=$(grep -E '^\s*metadata:\s*$|^\s*name:\s*' "$namespace_file" | awk -F':' '{gsub(/ /, "", $2); print $2}') else From b0a9e0bd8fab0bb959a9dd6e29534d2ec46d5e4b Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Sat, 13 Jan 2024 00:41:22 +0000 Subject: [PATCH 072/104] Update commit for namespace location --- .github/workflows/new-pull-request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 078b13f5..6aada4ba 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -67,7 +67,7 @@ jobs: echo $namespace_file_subdirectory # get namespace from dev branch directory where the updated file is being placed - while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z $namespace_file ]; do + while [ $(basename $namespace_file_subdirectory) != "Partner" ] || [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z $namespace_file ]; do echo $namespace_file_subdirectory namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) @@ -101,7 +101,7 @@ jobs: mkdir -p ./$namespace_file_subdirectory/ mv "$config_map_file" ./$namespace_file_subdirectory/ - git add . + git add ./$namespace_file_subdirectory/ else echo "No Namespace found, Invalid namespace file" From 53280069a72e262031f47eb479e14ace315afee3 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Sat, 13 Jan 2024 00:44:06 +0000 Subject: [PATCH 073/104] Fix loop --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 6aada4ba..c785442a 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -67,7 +67,7 @@ jobs: echo $namespace_file_subdirectory # get namespace from dev branch directory where the updated file is being placed - while [ $(basename $namespace_file_subdirectory) != "Partner" ] || [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z $namespace_file ]; do + while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z $namespace_file ]; do echo $namespace_file_subdirectory namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) From f966d3a1818f7cb0f54f19a897dcca479bd14e42 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Sat, 13 Jan 2024 00:48:49 +0000 Subject: [PATCH 074/104] Troubleshooting loop --- .github/workflows/new-pull-request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index c785442a..5b78df2f 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -68,13 +68,13 @@ jobs: # get namespace from dev branch directory where the updated file is being placed while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z $namespace_file ]; do - echo $namespace_file_subdirectory + echo "SubDir: $namespace_file_subdirectory" namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") + echo "Namespace File: $namespace_file" namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) done if [ -f $namespace_file ]; then - echo "Namespace File found: $namespace_file" namespace_file_subdirectory=$(dirname $namespace_file) namespace_name=$(grep -E '^\s*metadata:\s*$|^\s*name:\s*' "$namespace_file" | awk -F':' '{gsub(/ /, "", $2); print $2}') else From f1f2955d992311eb6cef0cbfc5c3aa9b094b6f8e Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Sat, 13 Jan 2024 00:54:43 +0000 Subject: [PATCH 075/104] Troubleshooting loop 2 --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 5b78df2f..33ffd012 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -98,7 +98,7 @@ jobs: echo " commitHash: ${{ github.event.pull_request.head.sha }}" >> $config_map_file echo " deployed: \"$(date +%s)\"" >> $config_map_file echo " env: $(echo $subdirectory | cut -f1 -d/ | awk -F- '{print $NF}' )" >> $config_map_file - + echo "$config_map_file" mkdir -p ./$namespace_file_subdirectory/ mv "$config_map_file" ./$namespace_file_subdirectory/ git add ./$namespace_file_subdirectory/ From db121ad7ccc8ab507d721bf6fef62fe1439c8df7 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Sat, 13 Jan 2024 00:58:08 +0000 Subject: [PATCH 076/104] Troubleshooting loop 3 --- .github/workflows/new-pull-request.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 33ffd012..e61b3e8f 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -65,6 +65,7 @@ jobs: subdirectory=$(dirname $filename) namespace_file_subdirectory=$(dirname $filename) echo $namespace_file_subdirectory + namespace_file="" # get namespace from dev branch directory where the updated file is being placed while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z $namespace_file ]; do From b55436ad876c87c0b3088995c46af4a50d81924a Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 20:16:22 +0000 Subject: [PATCH 077/104] Updated loop condition --- .github/workflows/new-pull-request.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index e61b3e8f..94dd9692 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -64,11 +64,10 @@ jobs: # Parse namespace data subdirectory=$(dirname $filename) namespace_file_subdirectory=$(dirname $filename) - echo $namespace_file_subdirectory namespace_file="" # get namespace from dev branch directory where the updated file is being placed - while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z $namespace_file ]; do + while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ ! -f $namespace_file ]; do echo "SubDir: $namespace_file_subdirectory" namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") echo "Namespace File: $namespace_file" From bc6bfc875289c3aadcc602aa31b6670a9dbe8c83 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 20:24:28 +0000 Subject: [PATCH 078/104] Updated loop condition 2 --- .github/workflows/new-pull-request.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 94dd9692..246212a2 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -60,7 +60,11 @@ jobs: for item in "${files[@]}"; do status=$(echo "$item" | jq -r '.status') filename=$(echo "$item" | jq -r '.filename') + + if [ "$status" != removed ]; then + echo "File: $filename" + # Parse namespace data subdirectory=$(dirname $filename) namespace_file_subdirectory=$(dirname $filename) From ef1920b844faa36dd770176a4a13c419bcd0bdda Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 20:38:35 +0000 Subject: [PATCH 079/104] Updated loop condition 3 --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 246212a2..3e03f2e4 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -71,7 +71,7 @@ jobs: namespace_file="" # get namespace from dev branch directory where the updated file is being placed - while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ ! -f $namespace_file ]; do + while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [[ -z $namespace_file ]]; do echo "SubDir: $namespace_file_subdirectory" namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") echo "Namespace File: $namespace_file" From 83a4ad77acc0d3e460691c3c040af422ee7cb116 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 20:53:44 +0000 Subject: [PATCH 080/104] Updated loop condition 4 --- .github/workflows/new-pull-request.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 3e03f2e4..4df67629 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -69,10 +69,12 @@ jobs: subdirectory=$(dirname $filename) namespace_file_subdirectory=$(dirname $filename) namespace_file="" + namespace_file_found=0 # get namespace from dev branch directory where the updated file is being placed - while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [[ -z $namespace_file ]]; do + while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ ! $namespace_file_found ]; do echo "SubDir: $namespace_file_subdirectory" + namespace_file_found=$(find $namespace_file_subdirectory -name "*namespace*" | wc -l) namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") echo "Namespace File: $namespace_file" namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) @@ -102,7 +104,6 @@ jobs: echo " commitHash: ${{ github.event.pull_request.head.sha }}" >> $config_map_file echo " deployed: \"$(date +%s)\"" >> $config_map_file echo " env: $(echo $subdirectory | cut -f1 -d/ | awk -F- '{print $NF}' )" >> $config_map_file - echo "$config_map_file" mkdir -p ./$namespace_file_subdirectory/ mv "$config_map_file" ./$namespace_file_subdirectory/ git add ./$namespace_file_subdirectory/ From 3487fc11be145cea00f1ca38a703bd5c14f92621 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 20:57:51 +0000 Subject: [PATCH 081/104] Updated loop condition 5 --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 4df67629..c6bb076c 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -72,7 +72,7 @@ jobs: namespace_file_found=0 # get namespace from dev branch directory where the updated file is being placed - while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ ! $namespace_file_found ]; do + while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && (( $namespace_file_found==0 )); do echo "SubDir: $namespace_file_subdirectory" namespace_file_found=$(find $namespace_file_subdirectory -name "*namespace*" | wc -l) namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") From ecff0f765fd756c7b492d779f5087904cfa77f57 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 21:03:59 +0000 Subject: [PATCH 082/104] Updated loop condition 6 --- .github/workflows/new-pull-request.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index c6bb076c..3bfbbb0a 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -69,13 +69,11 @@ jobs: subdirectory=$(dirname $filename) namespace_file_subdirectory=$(dirname $filename) namespace_file="" - namespace_file_found=0 # get namespace from dev branch directory where the updated file is being placed - while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && (( $namespace_file_found==0 )); do + while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z $(find $namespace_file_subdirectory -name *namespace*) ]; do echo "SubDir: $namespace_file_subdirectory" namespace_file_found=$(find $namespace_file_subdirectory -name "*namespace*" | wc -l) - namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") echo "Namespace File: $namespace_file" namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) done From 949cd4a08fbb041c33c3d627cda17e91556af16b Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 21:27:15 +0000 Subject: [PATCH 083/104] Updated loop condition 7 --- .github/workflows/new-pull-request.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 3bfbbb0a..92189c8a 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -68,14 +68,16 @@ jobs: # Parse namespace data subdirectory=$(dirname $filename) namespace_file_subdirectory=$(dirname $filename) - namespace_file="" + namespace_file=$(find $namespace_file_subdirectory -name *namespace*) + echo "SubDir: $namespace_file_subdirectory" + echo "Namespace File: $namespace_file" # get namespace from dev branch directory where the updated file is being placed while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z $(find $namespace_file_subdirectory -name *namespace*) ]; do + namespace_file=$(find $namespace_file_subdirectory -name *namespace*) + namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) echo "SubDir: $namespace_file_subdirectory" - namespace_file_found=$(find $namespace_file_subdirectory -name "*namespace*" | wc -l) echo "Namespace File: $namespace_file" - namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) done if [ -f $namespace_file ]; then From 98d5b625960996713c772c0e18d25b6849133e6c Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 21:36:44 +0000 Subject: [PATCH 084/104] Updated loop condition 8 --- .github/workflows/new-pull-request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 92189c8a..639e4efc 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -73,8 +73,8 @@ jobs: echo "Namespace File: $namespace_file" # get namespace from dev branch directory where the updated file is being placed - while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z $(find $namespace_file_subdirectory -name *namespace*) ]; do - namespace_file=$(find $namespace_file_subdirectory -name *namespace*) + while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z "$(find $namespace_file_subdirectory -name *namespace*)" ]; do + namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) echo "SubDir: $namespace_file_subdirectory" echo "Namespace File: $namespace_file" From 7c02494c4e519fda56c70314dac9f737dc933ff1 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 21:55:47 +0000 Subject: [PATCH 085/104] Update loop 1 --- .github/workflows/new-pull-request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 639e4efc..359d88d3 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -73,9 +73,9 @@ jobs: echo "Namespace File: $namespace_file" # get namespace from dev branch directory where the updated file is being placed - while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z "$(find $namespace_file_subdirectory -name *namespace*)" ]; do - namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") + while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z "$(find $namespace_file_subdirectory -name '*namespace*')" ]; do namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) + namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") echo "SubDir: $namespace_file_subdirectory" echo "Namespace File: $namespace_file" done From c692f3d694f9faa66016c5c06fcdfb15ac5c5c68 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 22:23:38 +0000 Subject: [PATCH 086/104] Checking Configmap locations --- .github/workflows/new-pull-request.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 359d88d3..9d316566 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -69,15 +69,11 @@ jobs: subdirectory=$(dirname $filename) namespace_file_subdirectory=$(dirname $filename) namespace_file=$(find $namespace_file_subdirectory -name *namespace*) - echo "SubDir: $namespace_file_subdirectory" - echo "Namespace File: $namespace_file" # get namespace from dev branch directory where the updated file is being placed while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z "$(find $namespace_file_subdirectory -name '*namespace*')" ]; do namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") - echo "SubDir: $namespace_file_subdirectory" - echo "Namespace File: $namespace_file" done if [ -f $namespace_file ]; then @@ -107,6 +103,7 @@ jobs: mkdir -p ./$namespace_file_subdirectory/ mv "$config_map_file" ./$namespace_file_subdirectory/ git add ./$namespace_file_subdirectory/ + echo "ConfigMap Created: ./$namespace_file_subdirectory/$config_map_file" else echo "No Namespace found, Invalid namespace file" From a723cd451aa1ab585d4658a5fec42aa48763266e Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 23:34:06 +0000 Subject: [PATCH 087/104] Checking Configmap locations 2 --- .github/workflows/close-pull-request.yaml | 3 +++ .github/workflows/new-pull-request.yaml | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/close-pull-request.yaml b/.github/workflows/close-pull-request.yaml index 7d4d610f..eff38296 100644 --- a/.github/workflows/close-pull-request.yaml +++ b/.github/workflows/close-pull-request.yaml @@ -6,6 +6,9 @@ on: paths-ignore: - 'Validated_Partners/**' - '.github/**' + - 'docs' + - '.git' + jobs: merge-master-back-to-dev: if: github.event.pull_request.merged == false diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 9d316566..9e726a34 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -69,11 +69,15 @@ jobs: subdirectory=$(dirname $filename) namespace_file_subdirectory=$(dirname $filename) namespace_file=$(find $namespace_file_subdirectory -name *namespace*) + echo "SubDir: $namespace_file_subdirectory" + echo "Namespace File: $namespace_file" # get namespace from dev branch directory where the updated file is being placed while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z "$(find $namespace_file_subdirectory -name '*namespace*')" ]; do namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") + echo "SubDir: $namespace_file_subdirectory" + echo "Namespace File: $namespace_file" done if [ -f $namespace_file ]; then @@ -103,7 +107,7 @@ jobs: mkdir -p ./$namespace_file_subdirectory/ mv "$config_map_file" ./$namespace_file_subdirectory/ git add ./$namespace_file_subdirectory/ - echo "ConfigMap Created: ./$namespace_file_subdirectory/$config_map_file" + echo "./$namespace_file_subdirectory/$config_map_file" else echo "No Namespace found, Invalid namespace file" From b436855008dc4e283f791417a37f0105d95c4475 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 23:37:03 +0000 Subject: [PATCH 088/104] Checking Configmap locations 3 --- .github/workflows/new-pull-request.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 9e726a34..5ebf2cd8 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -74,6 +74,11 @@ jobs: # get namespace from dev branch directory where the updated file is being placed while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z "$(find $namespace_file_subdirectory -name '*namespace*')" ]; do + if [ $(basename $namespace_file_subdirectory) != "Partner" ] || [ $(basename $namespace_file_subdirectory) != "Core" ] + echo "No Namespace File Found" + exit 200 + fi + namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") echo "SubDir: $namespace_file_subdirectory" From c00aa1778f45b4aa0aa502dd24f2edecfef17c3f Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 23:39:27 +0000 Subject: [PATCH 089/104] Fix the If statement --- .github/workflows/new-pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 5ebf2cd8..6cbcafe9 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -74,7 +74,7 @@ jobs: # get namespace from dev branch directory where the updated file is being placed while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z "$(find $namespace_file_subdirectory -name '*namespace*')" ]; do - if [ $(basename $namespace_file_subdirectory) != "Partner" ] || [ $(basename $namespace_file_subdirectory) != "Core" ] + if [ $(basename $namespace_file_subdirectory) != "Partner" ] || [ $(basename $namespace_file_subdirectory) != "Core" ]; then echo "No Namespace File Found" exit 200 fi From 81ea0c139c12188e53e12bc1049a1e7f7489242b Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 23:47:56 +0000 Subject: [PATCH 090/104] Fix the exit condition in while loop --- .github/workflows/new-pull-request.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 6cbcafe9..5c489376 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -73,8 +73,9 @@ jobs: echo "Namespace File: $namespace_file" # get namespace from dev branch directory where the updated file is being placed - while [ $(basename $namespace_file_subdirectory) != "Partner" ] && [ $(basename $namespace_file_subdirectory) != "Core" ] && [ -z "$(find $namespace_file_subdirectory -name '*namespace*')" ]; do - if [ $(basename $namespace_file_subdirectory) != "Partner" ] || [ $(basename $namespace_file_subdirectory) != "Core" ]; then + while [ -z "$(find $namespace_file_subdirectory -name '*namespace*')" ]; do + + if [ $(basename $namespace_file_subdirectory) == "Partner" ] || [ $(basename $namespace_file_subdirectory) == "Core" ]; then echo "No Namespace File Found" exit 200 fi From fce60185432d67ae8d26cbe62954db97044dca16 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 23:52:17 +0000 Subject: [PATCH 091/104] Fix the exit condition in while loop 2 --- .github/workflows/new-pull-request.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 5c489376..4d9fac54 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -74,7 +74,7 @@ jobs: # get namespace from dev branch directory where the updated file is being placed while [ -z "$(find $namespace_file_subdirectory -name '*namespace*')" ]; do - + echo "$(basename $namespace_file_subdirectory)" if [ $(basename $namespace_file_subdirectory) == "Partner" ] || [ $(basename $namespace_file_subdirectory) == "Core" ]; then echo "No Namespace File Found" exit 200 @@ -82,8 +82,8 @@ jobs: namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") - echo "SubDir: $namespace_file_subdirectory" - echo "Namespace File: $namespace_file" + # echo "SubDir: $namespace_file_subdirectory" + # echo "Namespace File: $namespace_file" done if [ -f $namespace_file ]; then From 533613232554dc767456ba92ca2b843c0fb879c2 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Tue, 16 Jan 2024 23:56:34 +0000 Subject: [PATCH 092/104] Fix the exit condition in while loop 3 --- .github/workflows/new-pull-request.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 4d9fac54..369067e7 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -74,13 +74,14 @@ jobs: # get namespace from dev branch directory where the updated file is being placed while [ -z "$(find $namespace_file_subdirectory -name '*namespace*')" ]; do + namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) echo "$(basename $namespace_file_subdirectory)" if [ $(basename $namespace_file_subdirectory) == "Partner" ] || [ $(basename $namespace_file_subdirectory) == "Core" ]; then echo "No Namespace File Found" exit 200 fi - namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) + namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") # echo "SubDir: $namespace_file_subdirectory" # echo "Namespace File: $namespace_file" From 156e5c0554fe1a73d0cff28732352eedf6adc8f0 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Wed, 17 Jan 2024 17:13:55 +0000 Subject: [PATCH 093/104] Updated console outputs --- .github/workflows/new-pull-request.yaml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 369067e7..ffa49fc0 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -63,28 +63,19 @@ jobs: if [ "$status" != removed ]; then - echo "File: $filename" - # Parse namespace data subdirectory=$(dirname $filename) namespace_file_subdirectory=$(dirname $filename) namespace_file=$(find $namespace_file_subdirectory -name *namespace*) - echo "SubDir: $namespace_file_subdirectory" - echo "Namespace File: $namespace_file" - # get namespace from dev branch directory where the updated file is being placed + # get namespace from dev branch partner directory while [ -z "$(find $namespace_file_subdirectory -name '*namespace*')" ]; do namespace_file_subdirectory=$(dirname $namespace_file_subdirectory) - echo "$(basename $namespace_file_subdirectory)" if [ $(basename $namespace_file_subdirectory) == "Partner" ] || [ $(basename $namespace_file_subdirectory) == "Core" ]; then - echo "No Namespace File Found" + echo "No Namespace File Found in Partner Directory" exit 200 fi - - namespace_file=$(find $namespace_file_subdirectory -name "*namespace*") - # echo "SubDir: $namespace_file_subdirectory" - # echo "Namespace File: $namespace_file" done if [ -f $namespace_file ]; then From c9426cf45fc859e32ccb7c9a7047785c1026300a Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Wed, 17 Jan 2024 17:19:45 +0000 Subject: [PATCH 094/104] Updated console outputs - Remove Troubleshooting points --- .github/workflows/new-pull-request.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index ffa49fc0..c132f8ba 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -105,7 +105,6 @@ jobs: mkdir -p ./$namespace_file_subdirectory/ mv "$config_map_file" ./$namespace_file_subdirectory/ git add ./$namespace_file_subdirectory/ - echo "./$namespace_file_subdirectory/$config_map_file" else echo "No Namespace found, Invalid namespace file" From b74d377f7454e392d60a7442c2e98d3968ac1901 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Wed, 17 Jan 2024 17:22:53 +0000 Subject: [PATCH 095/104] Re-direct workflow trigger to main in preparation for PR --- .github/workflows/close-pull-request.yaml | 2 +- .github/workflows/new-pull-request.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/close-pull-request.yaml b/.github/workflows/close-pull-request.yaml index eff38296..06029a9e 100644 --- a/.github/workflows/close-pull-request.yaml +++ b/.github/workflows/close-pull-request.yaml @@ -1,7 +1,7 @@ name: PR Closed - purging developer_branch on: pull_request_target: - branches: [githubActions] + branches: [main] types: [closed] paths-ignore: - 'Validated_Partners/**' diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index c132f8ba..0fcc5c61 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -2,7 +2,7 @@ name: PR Opened - moving new ISV addon to developer_branch for E2E testing on: pull_request_target: - branches: [githubActions] + branches: [main] types: [opened, reopened, synchronize] paths-ignore: - 'Validated_Partners/**' From ad727ffdd0de64fffe5dd101fe5ade7a809bec2b Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Wed, 17 Jan 2024 18:36:51 +0000 Subject: [PATCH 096/104] Target ghithubActions branch for demo purposes --- .github/workflows/close-pull-request.yaml | 2 +- .github/workflows/new-pull-request.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/close-pull-request.yaml b/.github/workflows/close-pull-request.yaml index 06029a9e..eff38296 100644 --- a/.github/workflows/close-pull-request.yaml +++ b/.github/workflows/close-pull-request.yaml @@ -1,7 +1,7 @@ name: PR Closed - purging developer_branch on: pull_request_target: - branches: [main] + branches: [githubActions] types: [closed] paths-ignore: - 'Validated_Partners/**' diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 0fcc5c61..c132f8ba 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -2,7 +2,7 @@ name: PR Opened - moving new ISV addon to developer_branch for E2E testing on: pull_request_target: - branches: [main] + branches: [githubActions] types: [opened, reopened, synchronize] paths-ignore: - 'Validated_Partners/**' From 397a05ec06207dea1bb4ee3bf3088b67ccacdbc0 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Wed, 17 Jan 2024 18:46:41 +0000 Subject: [PATCH 097/104] Additional Delete file Testing --- .github/workflows/new-pull-request.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index c132f8ba..eb899623 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -51,6 +51,7 @@ jobs: echo "Moving $filename" else echo "Deleting $filename" + git add $filename rm $filename fi done From a5dbd701ab0cb318d981d903f231287b32fe3893 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Wed, 17 Jan 2024 18:49:54 +0000 Subject: [PATCH 098/104] Additional Renaming file Testing --- .github/workflows/new-pull-request.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index eb899623..56c3b50b 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -43,6 +43,7 @@ jobs: if [ "$status" == renamed ]; then git checkout pr -- $filename git add $filename + git add $(echo "$item" | jq -r '.previous_filename') rm $(echo "$item" | jq -r '.previous_filename') echo "Renaming $filename" elif [ "$status" != removed ]; then From 619e27b6a35f19cae3e4a07a3a50a606db54017d Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Wed, 17 Jan 2024 18:56:39 +0000 Subject: [PATCH 099/104] Git rm usage --- .github/workflows/new-pull-request.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 56c3b50b..2adb3e15 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -43,8 +43,7 @@ jobs: if [ "$status" == renamed ]; then git checkout pr -- $filename git add $filename - git add $(echo "$item" | jq -r '.previous_filename') - rm $(echo "$item" | jq -r '.previous_filename') + git rm $(echo "$item" | jq -r '.previous_filename') echo "Renaming $filename" elif [ "$status" != removed ]; then git checkout pr -- $filename @@ -52,8 +51,7 @@ jobs: echo "Moving $filename" else echo "Deleting $filename" - git add $filename - rm $filename + git rm $filename fi done From 40f7a9fe8ed1c58a8b7a4017c565e86dbf0d6a1e Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Mon, 22 Jan 2024 21:19:16 +0000 Subject: [PATCH 100/104] Console out --- .github/workflows/new-pull-request.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 2adb3e15..c1c4b172 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -40,6 +40,8 @@ jobs: status=$(echo "$item" | jq -r '.status') filename=$(echo "$item" | jq -r '.filename') + echo "$files" + if [ "$status" == renamed ]; then git checkout pr -- $filename git add $filename From f378bb9c92da91f6bab09cd4dc3c930853ff59ec Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Mon, 22 Jan 2024 21:44:23 +0000 Subject: [PATCH 101/104] Updated git rm safety --- .github/workflows/new-pull-request.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index c1c4b172..e0265423 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -45,15 +45,19 @@ jobs: if [ "$status" == renamed ]; then git checkout pr -- $filename git add $filename - git rm $(echo "$item" | jq -r '.previous_filename') + if [ -f $(echo "$item" | jq -r '.previous_filename') ]; then + git rm $(echo "$item" | jq -r '.previous_filename') + fi echo "Renaming $filename" elif [ "$status" != removed ]; then git checkout pr -- $filename git add $filename echo "Moving $filename" else - echo "Deleting $filename" - git rm $filename + if [ -f $filename ]; then + echo "Deleting $filename" + git rm $filename + fi fi done From 85319908d272489ebf67a88640cb45c530ca84b5 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Mon, 22 Jan 2024 21:57:12 +0000 Subject: [PATCH 102/104] Remove console output --- .github/workflows/new-pull-request.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index e0265423..c0e4dcb7 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -40,8 +40,6 @@ jobs: status=$(echo "$item" | jq -r '.status') filename=$(echo "$item" | jq -r '.filename') - echo "$files" - if [ "$status" == renamed ]; then git checkout pr -- $filename git add $filename From cfb4c219d2a63d0d5a4b293aa02ebbf6c6928340 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Mon, 22 Jan 2024 22:08:36 +0000 Subject: [PATCH 103/104] Add pause for Synchronize to prevent concurrent execution on re-open with edits --- .github/workflows/new-pull-request.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index c0e4dcb7..95e11d31 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -21,6 +21,10 @@ jobs: run: git fetch origin pull/${{ github.event.pull_request.number }}/head:pr + - if: ${{github.event.action == 'synchronize' }} + name: Sync Pause + run: sleep 120 + - name: Parse Namespace data, Create ConfigMap id: find-namespace-yaml run: | From c6e95e433c108ba4dfe46fdfdcbe4a0382ae0c51 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Fri, 26 Jan 2024 19:21:19 +0000 Subject: [PATCH 104/104] Update Branch targets to prepare for AWS-Samples PR --- .github/workflows/close-pull-request.yaml | 2 +- .github/workflows/new-pull-request.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/close-pull-request.yaml b/.github/workflows/close-pull-request.yaml index eff38296..06029a9e 100644 --- a/.github/workflows/close-pull-request.yaml +++ b/.github/workflows/close-pull-request.yaml @@ -1,7 +1,7 @@ name: PR Closed - purging developer_branch on: pull_request_target: - branches: [githubActions] + branches: [main] types: [closed] paths-ignore: - 'Validated_Partners/**' diff --git a/.github/workflows/new-pull-request.yaml b/.github/workflows/new-pull-request.yaml index 95e11d31..86fae1e6 100644 --- a/.github/workflows/new-pull-request.yaml +++ b/.github/workflows/new-pull-request.yaml @@ -2,7 +2,7 @@ name: PR Opened - moving new ISV addon to developer_branch for E2E testing on: pull_request_target: - branches: [githubActions] + branches: [main] types: [opened, reopened, synchronize] paths-ignore: - 'Validated_Partners/**'