Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add local gitlab at localhost:8080 #24

Merged
merged 4 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions gitlab.values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
gitlab:
toolbox:
enabled: false
gitlab-shell:
enabled: false
gitlab-pages:
enabled: false
gitlab-exporter:
enabled: false
kas:
minReplicas: 1
webservice:
minReplicas: 1
ingress:
requireBasePath: false
global:
hosts:
domain: localhost
https: false
gitlab:
name: localhost
https: false
ingress:
enabled: true
configureCertmanager: false
tls:
enabled: false
redis:
install: false
traefik:
enabled: false
gitlab-runner:
install: false
registry:
enabled: false
prometheus:
install: false
certmanager:
installCRDs: false
install: false

nginx-ingress:
controller:
ingressClassResource:
name: gitlab-nginx
controllerValue: "k8s.io/ingress-nginx-gitlab"
replicaCount: 1
minAavailable: 1
service:
type: NodePort
nodePorts:
http: 32080
4 changes: 4 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ init-argo-workflows: init-kind
init-piper: init-kind local-build
sh ./scripts/init-piper.sh

.PHONY: init-gitlab
init-gitlab: init-kind
sh ./scripts/init-gitlab.sh

.PHONY: deploy
deploy: init-kind init-nginx init-argo-workflows local-build local-push init-piper

Expand Down
29 changes: 29 additions & 0 deletions scripts/init-argo-workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,32 @@ if [ -z "$(helm list -n workflows | grep argo-workflow)" ]; then
else
echo "Workflows release exists, skipping installation"
fi


cat <<EOF | kubectl apply -n workflows -f -
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo-workflows-sa
automountServiceAccountToken: true
---
apiVersion: v1
kind: Secret
metadata:
name: argo-workflows-sa.service-account-token
annotations:
kubernetes.io/service-account.name: argo-workflows-sa
type: kubernetes.io/service-account-token
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: argo-workflows-sa
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: argo-workflow-argo-workflows-workflow
subjects:
- kind: ServiceAccount
name: argo-workflows-sa
EOF
10 changes: 10 additions & 0 deletions scripts/init-gitlab.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
set -o errexit

if [ -z "$(helm list -n gitlab | grep gitlab)" ]; then
# 8. Install gitlab
helm repo add gitlab https://charts.gitlab.io/
helm upgrade --install gitlab --create-namespace -n gitlab gitlab/gitlab -f gitlab.values.yaml
else
echo "Gitlab release exists, skipping installation"
fi
3 changes: 3 additions & 0 deletions scripts/init-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ nodes:
- containerPort: 443
hostPort: 443
protocol: TCP
- containerPort: 32080
hostPort: 8080
listenAddress: "0.0.0.0"
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry]
Expand Down
6 changes: 5 additions & 1 deletion workflows.values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
controller:
workflowNamespaces:
- workflows
workflowDefaults:
spec:
serviceAccountName: argo-workflows-sa
server:
baseHref: /argo/
serviceAccount:
Expand All @@ -15,4 +18,5 @@ server:
nginx.ingress.kubernetes.io/backend-protocol: HTTP
paths:
- /argo/(.*)
- /argo
- /argo
pathType: ImplementationSpecific
Loading