File tree Expand file tree Collapse file tree 4 files changed +19
-6
lines changed Expand file tree Collapse file tree 4 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Secret
3+ metadata :
4+ name : kube-cicd
5+ namespace : kube-system
6+ annotations :
7+ kubernetes.io/service-account.name : kube-cicd
8+ type : kubernetes.io/service-account-token
Original file line number Diff line number Diff line change @@ -11,8 +11,12 @@ kubectl apply -f $CB_KUBERNETES_TEMPLATES_DIR/namespace.yaml
1111kubectl config set-context --current --namespace=$NS
1212kubectl config view --minify | grep namespace:
1313
14- # Apply service account
14+ # Apply service account and secret
1515kubectl apply -f $CB_KUBERNETES_TEMPLATES_DIR /service-account.yaml
16+ kubectl apply -f $CB_KUBERNETES_TEMPLATES_DIR /service-account-secret.yaml
17+
18+ # Create secret
19+
1620
1721# Create Load Balancer Certification
1822$CB_STATE_DIR /gen-lb-cert.sh
Original file line number Diff line number Diff line change @@ -69,4 +69,5 @@ data "oci_containerengine_cluster_option" options {
6969locals {
7070 versions = reverse (sort (data. oci_containerengine_cluster_option . options . kubernetes_versions ))
7171 latest = local. versions [0 ]
72- }
72+ }
73+
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ FROM jenkins/jenkins:lts-jdk11
44USER root
55
66# install sudo and curl and setup apt for https sources as well as kubernetes dependencies
7- RUN apt-get update && apt-get install -qq -y sudo apt-transport-https ca-certificates curl
7+ RUN apt-get update && apt-get install -qq -y sudo ca-certificates curl
88
99
1010# install docker
@@ -14,13 +14,13 @@ RUN apt-get update && apt-get install -qq -y docker.io
1414RUN apt-get update && apt-get install -qq -y git
1515
1616# setup repository for kubectl install
17- RUN curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/ apt/doc/ apt-key .gpg && \
18- echo " deb [signed-by=/usr/share /keyrings/kubernetes-archive -keyring.gpg] https://apt.kubernetes .io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
17+ RUN curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key | sudo gpg --dearmor -o /etc/ apt/keyrings/kubernetes- apt-keyring .gpg && \
18+ echo ' deb [signed-by=/etc/apt /keyrings/kubernetes-apt -keyring.gpg] https://pkgs.k8s .io/core:/stable:/v1.28/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list
1919
2020# install kubectl
2121RUN sudo apt-get update && sudo apt-get install -y kubectl
2222
2323# install plugins
2424RUN jenkins-plugin-cli --plugins blueocean docker-workflow matrix-auth git workflow-aggregator credentials-binding configuration-as-code kubernetes-cli generic-webhook-trigger multibranch-scan-webhook-trigger
2525
26- USER jenkins
26+ USER jenkins
You can’t perform that action at this time.
0 commit comments