Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .secrets.baseline

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions image/cli/mascli/functions/gitops_cluster
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,8 @@ function gitops_cluster() {

export SECRET_NAME_INSTANA=${ACCOUNT_ID}${SM_DELIM}${CLUSTER_ID}${SM_DELIM}instana
export SECRET_KEY_INSTANA_KEY=${SECRET_NAME_INSTANA}#key
export SECRET_KEY_INSTANA_ARGOCD_USERNAME=${SECRET_NAME_INSTANA}#argocd_username
export SECRET_KEY_INSTANA_ARGOCD_PASSWORD=${SECRET_NAME_INSTANA}#argocd_password

export SECRET_NAME_SYSLOG_PULLSECRET=${ACCOUNT_ID}${SM_DELIM}syslog_pullsecret
export SECRET_KEY_SYSLOG_PULLSECRET=${SECRET_NAME_SYSLOG_PULLSECRET}#pullsecret
Expand Down Expand Up @@ -687,6 +689,18 @@ function gitops_cluster() {
sm_update_secret $SECRET_NAME_INSTANA "{\"key\": \"${INSTANA_KEY}\"}" "${TAGS}"
fi

if [ -n "$INSTANA_ARGOCD_USERNAME" ]; then
echo "- Update INSTANA_ARGOCD_USERNAME secret"
TAGS="[{\"Key\": \"source\", \"Value\": \"gitops_cluster\"}, {\"Key\": \"account\", \"Value\": \"${ACCOUNT_ID}\"}, {\"Key\": \"cluster\", \"Value\": \"${CLUSTER_ID}\"}]"
sm_update_secret $SECRET_NAME_INSTANA "{\"argocd_username\": \"${INSTANA_ARGOCD_USERNAME}\"}" "${TAGS}"
fi

if [ -n "$INSTANA_ARGOCD_PASSWORD" ]; then
echo "- Update INSTANA_ARGOCD_PASSWORD secret"
TAGS="[{\"Key\": \"source\", \"Value\": \"gitops_cluster\"}, {\"Key\": \"account\", \"Value\": \"${ACCOUNT_ID}\"}, {\"Key\": \"cluster\", \"Value\": \"${CLUSTER_ID}\"}]"
sm_update_secret $SECRET_NAME_INSTANA "{\"argocd_password\": \"${INSTANA_ARGOCD_PASSWORD}\"}" "${TAGS}"
fi

if [[ "$IMAGE_REPO_MIRROR" == "true" ]]; then
sm_verify_secret_exists $SECRET_NAME_AWS_ECR "ecr_aws_access_key_id,ecr_aws_secret_access_key"
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ instana_agent_operator:
env:
{{ INSTANA_AGENT_OPERATOR_ENV | indent }}
{%- endif %}

{%- if INSTANA_AGENT_OPERATOR_ARGOCD_PLUGIN_ENABLED is defined and INSTANA_AGENT_OPERATOR_ARGOCD_PLUGIN_ENABLED %}
argocd_plugin_enabled: true
argocd_insecure_skip_tls: {{ INSTANA_AGENT_OPERATOR_ARGOCD_INSECURE_SKIP_TLS }}
argocd_url: "{{ INSTANA_AGENT_OPERATOR_ARGOCD_URL }}"
argocd_clusters: {{ INSTANA_AGENT_OPERATOR_ARGOCD_CLUSTERS | toYaml }}
argocd_username: "<path:{{ SECRETS_PATH }}:{{ SECRET_KEY_INSTANA_ARGOCD_USERNAME }}>"
argocd_password: "<path:{{ SECRETS_PATH }}:{{ SECRET_KEY_INSTANA_ARGOCD_PASSWORD }}>"
{%- endif %}
Loading