Untitled

 avatar
cion
plain_text
17 days ago
1.0 kB
1
Indexable
Never
name: Create registry credentials secret
description: Creates a secret with docker credentials to allow pods to pull images from Artifactory
inputs:
  namespace:
    required: true
  docker-server:
    required: true
  docker-username:
    required: true
  docker-password:
    required: true

runs:
  using: "composite"
  steps:
    - name: Create registry credentials secret
      shell: bash
      run: |-
        export NO_PROXY="${NO_PROXY},${GKE_MASTER}"
        kubectl delete secret regcred \
          --namespace=${{ inputs.namespace }} \
          --ignore-not-found
        kubectl create secret docker-registry regcred \
            --docker-server=${{ inputs.docker-server }} \
            --docker-username=${{ inputs.docker-username }} \
            --docker-password=${{ inputs.docker-password }} \
            --docker-email=${{ inputs.docker-username }}@db.com \
            --namespace=${{ inputs.namespace }}
        kubectl get secret regcred --namespace=${{ inputs.namespace }}
Leave a Comment