Merge pull request #126 from HideyoshiSolutions/fix/fixes-broken-deployment

fix: fixes broken deployment
This commit is contained in:
2025-11-07 18:16:29 -03:00
committed by GitHub
2 changed files with 11 additions and 9 deletions

View File

@@ -11,11 +11,8 @@ on:
jobs: jobs:
deploy: deploy:
name: Deploy to Cluster name: Deploy to Cluster
environment: ${{ github.ref_name == 'main' && 'prod' || 'staging' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30 timeout-minutes: 30
env:
NAMESPACE: ${{ vars.NAMESPACE }}
steps: steps:
- name: Checkout Repository - name: Checkout Repository

View File

@@ -27,13 +27,18 @@ kubectl create namespace cert-manager \
kubectl apply -f manifest/charts/cert-manager kubectl apply -f manifest/charts/cert-manager
### configures docker registry secret ### ### set application namespaces and configures docker registry secret ###
if [[ -f $HOME/.docker/config.json ]]; then if [[ -f $HOME/.docker/config.json ]]; then
kubectl create secret generic regcred \ for NAMESPACE in ${NAMESPACES_LIST//,/ }; do
kubectl create namespace $NAMESPACE \
--dry-run=client -o yaml | kubectl apply -f -
kubectl create secret generic $(echo $NAMESPACE | tr '[:upper:]' '[:lower:]')-regcred \
--from-file=.dockerconfigjson=$HOME/.docker/config.json \ --from-file=.dockerconfigjson=$HOME/.docker/config.json \
--type=kubernetes.io/dockerconfigjson \ --type=kubernetes.io/dockerconfigjson \
--namespace=$NAMESPACE \ -n $NAMESPACE \
--dry-run=client -o yaml | kubectl apply -f - --dry-run=client -o yaml | kubectl apply -f -
done
else else
echo "Docker config file not found at $HOME/.docker/config.json. Skipping registry secret creation." echo "Docker config file not found at $HOME/.docker/config.json. Skipping registry secret creation."
fi fi