Skip to content

Commit

Permalink
Merge pull request #20 from edenlabllc/release/v1.27.0
Browse files Browse the repository at this point in the history
Release/v1.27.0
  • Loading branch information
anovikov-el authored Dec 18, 2024
2 parents 065350a + 88d3a81 commit c57009b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
38 changes: 38 additions & 0 deletions bin/aws-iam-config-postsync-hook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

set -e

RELEASE_NAME="${1:-aws-iam-config}"
NAMESPACE="${2:-capa-system}"
LIMIT="${3:-120}"

GO_TEMPLATE='
{{- range .items }}
{{- if not .status }}0{{- end }}
{{- range .status.conditions }}
{{- if ne .status "True" }}0{{- end }}
{{- end }}
{{- end -}}
'

COUNT=1

K8S_API_GROUP="iam.services.k8s.aws"
K8S_RESOURCES=("group" "instanceprofile" "openidconnectprovider" "role" "policy" "user")
K8S_RESOURCES=("${K8S_RESOURCES[@]/%/.${K8S_API_GROUP}}") # add ".${K8S_API_GROUP}" suffix to each array item
K8S_RESOURCES="$(IFS=,; echo "${K8S_RESOURCES[*]}")" # join array by ","

while true; do
STATUS="$(kubectl -n "${NAMESPACE}" get "${K8S_RESOURCES}" -l "app.kubernetes.io/instance=${RELEASE_NAME}" -o "go-template=${GO_TEMPLATE}")"
if [[ "${STATUS}" != "" && "${COUNT}" -le "${LIMIT}" ]]; then
sleep 1
((++COUNT))
elif [[ "${COUNT}" -gt "${LIMIT}" ]]; then
>2& echo "Limit exceeded."
exit 1
else
echo
kubectl -n "${NAMESPACE}" get "${K8S_RESOURCES}" -l "app.kubernetes.io/instance=${RELEASE_NAME}"
break
fi
done
1 change: 0 additions & 1 deletion bin/k8s-upgrade/rotate-linkerd-certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
set -e

function detect_linkerd() {
# shellcheck disable=SC2016
KODJIN_LINKERD_STATUS="$(kubectl get deployment --namespace=fhir-server --output=yaml | \
yq '.items[] | select(.spec.template.metadata.annotations."linkerd.io/inject" == "'"${1}"'") | .metadata | .name as $n | .namespace += "="+$n | .namespace')"
}
Expand Down

0 comments on commit c57009b

Please sign in to comment.