feat: add DockerHub authentication to prevent rate limiting
- Add dockerhub-secret.yaml with DockerHub credentials for Jenkins agents - Configure imagePullSecrets in all pipeline pod templates to use dockerhub-secret - This prevents DockerHub rate limiting when pulling base images during CI/CD builds
This commit is contained in:
parent
8f3df5c8b0
commit
d2b514795c
12
first-class-pipeline/pipeline/dockerhub-secret.yaml
Normal file
12
first-class-pipeline/pipeline/dockerhub-secret.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
# This Secret is used by jenkins-agent to authenticate with DockerHub when pulling images to avoid rate limiting
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
creationTimestamp: "2025-10-16T04:37:44Z"
|
||||
name: dockerhub-secret
|
||||
namespace: freeleaps-devops-system
|
||||
resourceVersion: "151921537"
|
||||
uid: 07532bf6-57dc-4da0-a6e7-93a5ad3b0149
|
||||
type: kubernetes.io/dockerconfigjson
|
||||
data:
|
||||
.dockerconfigjson: eyJhdXRocyI6eyJodHRwczovL2luZGV4LmRvY2tlci5pby92MS8iOnsidXNlcm5hbWUiOiJkZXZvcHNAbWF0aG1hc3QuY29tIiwicGFzc3dvcmQiOiJGcmVlbGVhcHNAMjAyNSIsImVtYWlsIjoiZGV2b3BzQG1hdGhtYXN0LmNvbSIsImF1dGgiOiJaR1YyYjNCelFHMWhkR2h0WVhOMExtTnZiVHBHY21WbGJHVmhjSE5BTWpBeU5RPT0ifX19
|
||||
@ -54,6 +54,8 @@ def generateComponentStages(component, configurations) {
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: dockerhub-secret
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
@ -148,6 +150,8 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: dockerhub-secret
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
@ -252,6 +256,8 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: dockerhub-secret
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
@ -311,6 +317,8 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: dockerhub-secret
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
@ -372,6 +380,8 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: dockerhub-secret
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
@ -491,6 +501,8 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: dockerhub-secret
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
@ -585,6 +597,8 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: dockerhub-secret
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
@ -661,6 +675,8 @@ metadata:
|
||||
labels:
|
||||
freeleaps-devops-system/milestone: commit-message-linting
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: dockerhub-secret
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user