-
-
Notifications
You must be signed in to change notification settings - Fork 0
Fix all services failing in AKS: add missing secrets, fix image refs #530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -325,12 +325,58 @@ jobs: | |
| -n ${{ env.NAMESPACE }} \ | ||
| --dry-run=client -o yaml | kubectl apply -f - | ||
|
|
||
| - name: Create MongoDB secret (Cosmos DB MongoDB API) | ||
| run: | | ||
| kubectl create secret generic mongodb-secret \ | ||
| --from-literal=connectionString="${{ secrets.COSMOS_DB_CONNECTION_STRING }}" \ | ||
| -n ${{ env.NAMESPACE }} \ | ||
| --dry-run=client -o yaml | kubectl apply -f - | ||
|
|
||
| - name: Create Cosmos DB endpoint/key secret | ||
| run: | | ||
| kubectl create secret generic cosmos-db-secret \ | ||
| --from-literal=endpoint="${{ secrets.COSMOS_DB_ENDPOINT }}" \ | ||
| --from-literal=key="${{ secrets.COSMOS_DB_KEY }}" \ | ||
| -n ${{ env.NAMESPACE }} \ | ||
| --dry-run=client -o yaml | kubectl apply -f - | ||
|
Comment on lines
+335
to
+341
|
||
|
|
||
| - name: Create Cosmos config secret (trading-partner) | ||
| run: | | ||
| kubectl create secret generic cosmos-config \ | ||
| --from-literal=endpoint="${{ secrets.COSMOS_DB_ENDPOINT }}" \ | ||
| --from-literal=key="${{ secrets.COSMOS_DB_KEY }}" \ | ||
| -n ${{ env.NAMESPACE }} \ | ||
| --dry-run=client -o yaml | kubectl apply -f - | ||
|
|
||
| - name: Create Redis secret | ||
| run: | | ||
| kubectl create secret generic redis-secret \ | ||
| --from-literal=connectionString="${{ secrets.REDIS_CONNECTION_STRING }}" \ | ||
| -n ${{ env.NAMESPACE }} \ | ||
| --dry-run=client -o yaml | kubectl apply -f - | ||
|
|
||
| - name: Create Kafka secret | ||
| run: | | ||
| kubectl create secret generic kafka-secret \ | ||
| --from-literal=saslUsername="${{ secrets.KAFKA_SASL_USERNAME }}" \ | ||
| --from-literal=saslPassword="${{ secrets.KAFKA_SASL_PASSWORD }}" \ | ||
| -n ${{ env.NAMESPACE }} \ | ||
| --dry-run=client -o yaml | kubectl apply -f - | ||
|
|
||
| - name: Create Azure Storage secret | ||
| run: | | ||
| kubectl create secret generic azure-storage-secret \ | ||
| --from-literal=connectionString="${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}" \ | ||
| -n ${{ env.NAMESPACE }} \ | ||
| --dry-run=client -o yaml | kubectl apply -f - | ||
|
|
||
| - name: Create Azure AD secret | ||
| run: | | ||
| kubectl create secret generic azure-ad-config \ | ||
| --from-literal=TenantId="${{ secrets.AZURE_AD_TENANT_ID }}" \ | ||
| --from-literal=ClientId="${{ secrets.AZURE_AD_CLIENT_ID }}" \ | ||
| --from-literal=ClientSecret="${{ secrets.AZURE_AD_CLIENT_SECRET }}" \ | ||
| --from-literal=Audience="${{ secrets.AZURE_AD_AUDIENCE }}" \ | ||
| -n ${{ env.NAMESPACE }} \ | ||
| --dry-run=client -o yaml | kubectl apply -f - | ||
|
|
||
|
|
@@ -380,6 +426,7 @@ jobs: | |
| echo "Applying ${manifest}..." | ||
| sed \ | ||
| -e "s|choacrhy6h2vdulfru6.azurecr.io/cloudhealthoffice-|${ACR}/cloudhealthoffice-|g" \ | ||
| -e "s|ghcr.io/aurelianware/cloudhealthoffice-|${ACR}/cloudhealthoffice-|g" \ | ||
| -e "s|:latest|:${SHA}|g" \ | ||
| "$manifest" \ | ||
| | kubectl apply -f - | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow is interpolating GitHub secrets directly into the shell script (e.g., "${{ secrets.COSMOS_DB_CONNECTION_STRING }}"). If any secret contains characters like
$(or backticks, bash will evaluate them during script parsing, and even benign characters can cause quoting/escaping issues. Prefer passing secrets via the stepenv:block and referencing them as normal shell variables when buildingkubectl create secretcommands (this avoids re-parsing secret contents by the shell).