Skip to content

Commit

Permalink
fix: login using docker creds on the node to allow to pull the desire…
Browse files Browse the repository at this point in the history
…d image (#3682)

* fix: login using docker creds on the node to allow to pull the desired image

* fix: add steps to create regcred secret and then patch deployment with it

* chore: fix the github action

* chore: patch the service account in openfaas-fn ns to allow for pulling openfaas flask base images

* chore: minor fixes
  • Loading branch information
abhimanyubabbar authored and kanishkkatara committed Aug 27, 2024
1 parent 6b2b01d commit 3d43771
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ut-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ jobs:
--set gateway.image=rudderlabs/rudder-openfaas-gateway:0.25.2 \
--set faasnetes.image=rudderlabs/rudder-openfaas-faas-netes:0.15.4
- name: Create regcred secret in openfaas
run: kubectl create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username=${{ secrets.DOCKERHUB_USERNAME }} --docker-password=${{ secrets.DOCKERHUB_TOKEN }} --docker-email=${{ secrets.DOCKERHUB_EMAIL }} -n openfaas

- name: Create regcred secret in openfaas-fn
run: kubectl create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username=${{ secrets.DOCKERHUB_USERNAME }} --docker-password=${{ secrets.DOCKERHUB_TOKEN }} --docker-email=${{ secrets.DOCKERHUB_EMAIL }} -n openfaas-fn

- name: Patch default service account in openfaas-fn
run: 'kubectl patch serviceaccount default -n openfaas-fn -p ''{"imagePullSecrets": [{"name": "regcred"}]}'''

- name: Patch deployment "gateway"
run: 'kubectl patch deployment gateway -n openfaas -p ''{"spec": {"template": {"spec": {"imagePullSecrets": [{"name": "regcred"}]}}}}'''

- name: Wait for deployment "gateway" rollout
run: kubectl rollout status deploy/gateway --timeout 120s -n openfaas

Expand Down

0 comments on commit 3d43771

Please sign in to comment.