Skip to content

Commit

Permalink
Fix pull policy (#236)
Browse files Browse the repository at this point in the history
Signed-off-by: Nima Kaviani <[email protected]>
  • Loading branch information
nimakaviani authored May 3, 2024
1 parent 1c40bbd commit bd62b42
Show file tree
Hide file tree
Showing 12 changed files with 97 additions and 18 deletions.
14 changes: 14 additions & 0 deletions hack/argo-cd/argocd-application-controller.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app.kubernetes.io/component: application-controller
app.kubernetes.io/name: argocd-application-controller
app.kubernetes.io/part-of: argocd
name: argocd-application-controller
spec:
template:
spec:
containers:
- name: argocd-application-controller
imagePullPolicy: IfNotPresent
14 changes: 14 additions & 0 deletions hack/argo-cd/argocd-applicationset-controller.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: applicationset-controller
app.kubernetes.io/name: argocd-applicationset-controller
app.kubernetes.io/part-of: argocd
name: argocd-applicationset-controller
spec:
template:
spec:
containers:
- name: argocd-applicationset-controller
imagePullPolicy: IfNotPresent
14 changes: 14 additions & 0 deletions hack/argo-cd/argocd-redis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: redis
app.kubernetes.io/name: argocd-redis
app.kubernetes.io/part-of: argocd
name: argocd-redis
spec:
template:
spec:
containers:
- name: redis
imagePullPolicy: IfNotPresent
14 changes: 14 additions & 0 deletions hack/argo-cd/argocd-repo-server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: repo-server
app.kubernetes.io/name: argocd-repo-server
app.kubernetes.io/part-of: argocd
name: argocd-repo-server
spec:
template:
spec:
containers:
- name: argocd-repo-server
imagePullPolicy: IfNotPresent
1 change: 1 addition & 0 deletions hack/argo-cd/argocd-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ spec:
- /argocd
- "{{end}}"
name: argocd-server
imagePullPolicy: IfNotPresent
8 changes: 8 additions & 0 deletions hack/argo-cd/dex-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ metadata:
name: argocd-dex-server
spec:
replicas: 0
template:
spec:
containers:
- name: dex
imagePullPolicy: IfNotPresent
initContainers:
- name: copyutil
imagePullPolicy: IfNotPresent
4 changes: 4 additions & 0 deletions hack/argo-cd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ patches:
- path: notifications-controller.yaml
- path: argocd-cm.yaml
- path: argocd-server.yaml
- path: argocd-application-controller.yaml
- path: argocd-applicationset-controller.yaml
- path: argocd-repo-server.yaml
- path: argocd-redis.yaml
5 changes: 5 additions & 0 deletions hack/argo-cd/notifications-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ metadata:
name: argocd-notifications-controller
spec:
replicas: 0
template:
spec:
containers:
- name: argocd-notifications-controller
imagePullPolicy: IfNotPresent
14 changes: 8 additions & 6 deletions hack/gitea/generate-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,22 @@ INSTALL_YAML="pkg/controllers/localbuild/resources/gitea/k8s/install.yaml"
GITEA_DIR="./hack/gitea"
CHART_VERSION="9.5.1"

echo "# GITEA INSTALL RESOURCES" > ${INSTALL_YAML}
echo "# This file is auto-generated with 'hack/gitea/generate-manifests.sh'" >> ${INSTALL_YAML}
echo "# GITEA INSTALL RESOURCES" >${INSTALL_YAML}
echo "# This file is auto-generated with 'hack/gitea/generate-manifests.sh'" >>${INSTALL_YAML}

helm repo add gitea-charts --force-update https://dl.gitea.com/charts/
helm repo update
helm template my-gitea gitea-charts/gitea -f ${GITEA_DIR}/values.yaml --version ${CHART_VERSION} >> ${INSTALL_YAML}
sed -i '3d' ${INSTALL_YAML}
helm template my-gitea gitea-charts/gitea -f ${GITEA_DIR}/values.yaml --version ${CHART_VERSION} >>${INSTALL_YAML}
sed -i.bak '3d' ${INSTALL_YAML}

# helm template for pvc uses Release.namespace which doesn't get set
# when running the helm "template" command
# See: https://gitea.com/gitea/helm-chart/issues/630
# and: https://gitea.com/gitea/helm-chart/src/commit/3b2b700441e91a19a535e05de3a9eab2fef0b117/templates/gitea/pvc.yaml#L6
# and: https://github.com/helm/helm/issues/3553#issuecomment-1186518158
# and: https://github.com/splunk/splunk-connect-for-kubernetes/pull/790
sed -i 's/namespace: default/namespace: gitea/g' ${INSTALL_YAML}
sed -i.bak 's/namespace: default/namespace: gitea/g' ${INSTALL_YAML}

cat ${GITEA_DIR}/ingress.yaml.tmpl >> ${INSTALL_YAML}
cat ${GITEA_DIR}/ingress.yaml.tmpl >>${INSTALL_YAML}

rm -rf "${INSTALL_YAML}.bak"
3 changes: 3 additions & 0 deletions hack/gitea/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ service:

ingress:
enabled: false

image:
pullPolicy: "IfNotPresent"
16 changes: 8 additions & 8 deletions pkg/controllers/localbuild/resources/argo/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21487,7 +21487,7 @@ spec:
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.10.7
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
name: argocd-applicationset-controller
ports:
- containerPort: 7000
Expand Down Expand Up @@ -21582,7 +21582,7 @@ spec:
name: argocd-cmd-params-cm
optional: true
image: ghcr.io/dexidp/dex:v2.37.0
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
name: dex
ports:
- containerPort: 5556
Expand Down Expand Up @@ -21611,7 +21611,7 @@ spec:
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:v2.10.7
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
name: copyutil
securityContext:
allowPrivilegeEscalation: false
Expand Down Expand Up @@ -21694,7 +21694,7 @@ spec:
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.10.7
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
livenessProbe:
tcpSocket:
port: 9001
Expand Down Expand Up @@ -21771,7 +21771,7 @@ spec:
- --appendonly
- "no"
image: redis:7.0.14-alpine
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
name: redis
ports:
- containerPort: 6379
Expand Down Expand Up @@ -22000,7 +22000,7 @@ spec:
- name: HELM_DATA_HOME
value: /helm-working-dir
image: quay.io/argoproj/argocd:v2.10.7
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
Expand Down Expand Up @@ -22374,7 +22374,7 @@ spec:
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.10.7
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
path: /healthz?full=true
Expand Down Expand Up @@ -22662,7 +22662,7 @@ spec:
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.10.7
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
name: argocd-application-controller
ports:
- containerPort: 8082
Expand Down
8 changes: 4 additions & 4 deletions pkg/controllers/localbuild/resources/gitea/k8s/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ spec:
initContainers:
- name: init-directories
image: "gitea/gitea:1.20.5-rootless"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command: ["/usr/sbin/init_directory_structure.sh"]
env:
- name: GITEA_APP_INI
Expand Down Expand Up @@ -430,7 +430,7 @@ spec:
memory: 128Mi
- name: init-app-ini
image: "gitea/gitea:1.20.5-rootless"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command: ["/usr/sbin/config_environment.sh"]
env:
- name: GITEA_APP_INI
Expand Down Expand Up @@ -461,7 +461,7 @@ spec:
- name: configure-gitea
image: "gitea/gitea:1.20.5-rootless"
command: ["/usr/sbin/configure_gitea.sh"]
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 1000
env:
Expand Down Expand Up @@ -502,7 +502,7 @@ spec:
containers:
- name: gitea
image: "gitea/gitea:1.20.5-rootless"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
env:
# SSH Port values have to be set here as well for openssh configuration
- name: SSH_LISTEN_PORT
Expand Down

0 comments on commit bd62b42

Please sign in to comment.