Skip to content

Externalize Docker Hub username and Azure Key Vault endpoint#8

Merged
mucsi96 merged 1 commit into
mainfrom
claude/update-deployment-secrets-vB3oZ
Mar 22, 2026
Merged

Externalize Docker Hub username and Azure Key Vault endpoint#8
mucsi96 merged 1 commit into
mainfrom
claude/update-deployment-secrets-vB3oZ

Conversation

@mucsi96

@mucsi96 mucsi96 commented Mar 22, 2026

Copy link
Copy Markdown
Owner

Summary

This PR externalizes hardcoded configuration values into environment variables to improve flexibility and security across the deployment pipeline and scripts.

Key Changes

  • Environment Variables: Added two new required environment variables:

    • DOCKERHUB_USERNAME: Replaces hardcoded "mucsi96" Docker Hub username
    • AZURE_KEYVAULT_ENDPOINT: Replaces hardcoded Azure Key Vault URL
  • Deployment Script (scripts/deploy.sh):

    • Added validation for the two new required environment variables
    • Updated Docker Hub registry queries to use $DOCKERHUB_USERNAME variable
    • Updated Helm deployment commands to reference the dynamic username for both server and client images
    • Updated Azure Key Vault endpoint configuration to use the environment variable
  • CI/CD Pipeline (.github/workflows/pipeline.yml):

    • Updated Docker login step to use ${{ secrets.DOCKERHUB_USERNAME }} instead of ${{ github.repository_owner }}
    • Updated server and client image build/push commands to use the secrets-based username
    • Added both new environment variables to the deployment job's environment configuration

Benefits

  • Enables deployment to different Docker Hub accounts without code changes
  • Supports multiple Azure Key Vault environments (dev, staging, production)
  • Improves security by removing hardcoded values
  • Increases flexibility for different deployment scenarios

https://claude.ai/code/session_016qayUKmBDMNrKvN4f3NLjE

Replace hardcoded github.repository_owner with DOCKERHUB_USERNAME secret
for Docker Hub image publishing. Replace hardcoded Azure Key Vault URL
with AZURE_KEYVAULT_ENDPOINT secret for deployment configuration.

https://claude.ai/code/session_016qayUKmBDMNrKvN4f3NLjE
@claude

claude Bot commented Mar 22, 2026

Copy link
Copy Markdown

PR Review - Externalize Docker Hub username and Azure Key Vault endpoint

Overall this is a clean, well-motivated change. The validation pattern using the colon-question-mark operator is idiomatic bash. A few issues to address:

BUG 1 - Helm will misparse the Key Vault URL: AZURE_KEYVAULT_ENDPOINT is a URL containing a colon. Helm --set treats colons specially, which can cause silent failures. Use --set-string for URL values instead of --set.

BUG 2 - No validation that fetched Docker tags are non-empty: If the Docker Hub API returns no results, jq outputs the string null but exits 0, so set -e will not catch it. Helm would then deploy with image tag null. Add an explicit check after each tag fetch using the same colon-question-mark pattern already used for env vars at the top of the script.

Minor - DOCKERHUB_USERNAME is not really a secret: Docker Hub usernames are public. A plain repository variable (vars.DOCKERHUB_USERNAME) would be more appropriate - it will not be masked in logs, aiding debugging.

Minor - Quote --set variables: All --set arguments using shell variables should be double-quoted to guard against word splitting.

The Helm URL parsing issue is the main blocker; the rest are discretionary improvements.

@mucsi96 mucsi96 merged commit 3d3b559 into main Mar 22, 2026
5 checks passed
@mucsi96 mucsi96 deleted the claude/update-deployment-secrets-vB3oZ branch March 22, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants