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

Cloudbank v1.0.1 #26

Merged
merged 2 commits into from
Sep 1, 2023
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
8 changes: 8 additions & 0 deletions cloudbank/kubernetes/service-account-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: kube-cicd
namespace: kube-system
annotations:
kubernetes.io/service-account.name: kube-cicd
type: kubernetes.io/service-account-token
6 changes: 5 additions & 1 deletion cloudbank/scripts/init-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ kubectl apply -f $CB_KUBERNETES_TEMPLATES_DIR/namespace.yaml
kubectl config set-context --current --namespace=$NS
kubectl config view --minify | grep namespace:

# Apply service account
# Apply service account and secret
kubectl apply -f $CB_KUBERNETES_TEMPLATES_DIR/service-account.yaml
kubectl apply -f $CB_KUBERNETES_TEMPLATES_DIR/service-account-secret.yaml

# Create secret


# Create Load Balancer Certification
$CB_STATE_DIR/gen-lb-cert.sh
Expand Down
3 changes: 2 additions & 1 deletion cloudbank/terraform/containerengine.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,5 @@ data "oci_containerengine_cluster_option" options {
locals {
versions = reverse(sort(data.oci_containerengine_cluster_option.options.kubernetes_versions))
latest = local.versions[0]
}
}

8 changes: 4 additions & 4 deletions cloudbank/terraform/jenkins-module/scripts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM jenkins/jenkins:lts-jdk11
USER root

# install sudo and curl and setup apt for https sources as well as kubernetes dependencies
RUN apt-get update && apt-get install -qq -y sudo apt-transport-https ca-certificates curl
RUN apt-get update && apt-get install -qq -y sudo ca-certificates curl


#install docker
Expand All @@ -14,13 +14,13 @@ RUN apt-get update && apt-get install -qq -y docker.io
RUN apt-get update && apt-get install -qq -y git

# setup repository for kubectl install
RUN curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg && \
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
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 && \
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

# install kubectl
RUN sudo apt-get update && sudo apt-get install -y kubectl

# install plugins
RUN 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

USER jenkins
USER jenkins