-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dsl): fix display name variable & add deploy helm chart
- Loading branch information
1 parent
a010a92
commit b67ed5a
Showing
13 changed files
with
161 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: v2 | ||
name: whanos-deploy | ||
description: A Whanos kube deployment with Jenkins | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "1.16.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Release.Name }}-deployment | ||
annotations: | ||
rollme: {{ randAlphaNum 5 | quote }} | ||
spec: | ||
replicas: {{ .Values.deployment.replicas }} | ||
selector: | ||
matchLabels: | ||
app: {{ .Release.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Release.Name }} | ||
annotations: | ||
rollme: {{ randAlphaNum 5 | quote }} | ||
spec: | ||
containers: | ||
- name: {{ .Values.image.name }} | ||
image: {{ .Values.image.image }} | ||
{{- if .Values.deployment.resources }} | ||
resources: {{ .Values.deployment.resources | toJson }} | ||
{{- end }} | ||
{{- if .Values.deployment.ports }} | ||
ports: | ||
{{- range .Values.deployment.ports }} | ||
- containerPort: {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.deployment.ports }} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Release.Name }}-lb | ||
spec: | ||
type: LoadBalancer | ||
ports: | ||
{{- range .Values.deployment.ports }} | ||
- targetPort: {{ . }} | ||
protocol: TCP | ||
port: {{ . }} | ||
name: {{ . | quote }} | ||
{{- end }} | ||
selector: | ||
app: {{ .Release.Name }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Default values for AutoDeploy. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
|
||
deployment: | ||
replicas: 1 | ||
resources: {} | ||
ports: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
#!/bin/bash | ||
printf "🚀 You can now access your Jenkins instance at http://localhost:8080\n" | ||
printf "🚀 You can now access your Docker registry at http://localhost:5000\n" | ||
|
||
get_jenkins_port() { | ||
kubectl get svc -n whanos whanos-jenkins -o jsonpath='{.spec.ports[0].nodePort}' | ||
} | ||
|
||
get_whanos_registry_address() { | ||
kubectl get ingress -n docker-registry docker-registry -o jsonpath="{.status.loadBalancer.ingress[0].ip}" | ||
} | ||
|
||
printf "🚀 You can now access your Jenkins instance at http://localhost:%s\n" "$(get_jenkins_port)" | ||
printf "🚀 You can now access your Docker registry at https://%s/\n" "$(get_whanos_registry_address)" | ||
printf "🚀 You can now access your Kubernetes dashboard at http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
#!/bin/bash | ||
printf "Installing jenkins\n" | ||
helm install whanos kube/helm/whanos --create-namespace --namespace whanos | ||
printf "Installed jenkins ✅\n\n\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
#!/bin/bash | ||
printf "Installing kubectl\n" | ||
printf "🏗️ Installing kubectl\n" | ||
sudo apt-get update | ||
sudo apt-get install -y apt-transport-https ca-certificates curl | ||
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg | ||
printf '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 | ||
sudo apt-get update | ||
sudo apt-get install -y kubectl | ||
printf "Installed kubectl ✅\n\n\n" | ||
printf "✅ Installed kubectl\n\n\n" | ||
|
||
printf "Configuring kubectl\n" | ||
printf "🏗️ Configuring kubectl\n" | ||
mkdir -p ~/.kube | ||
sudo cp /etc/kubernetes/admin.conf ~/.kube/config | ||
sudo chown $(id -u):$(id -g) ~/.kube/config | ||
printf "Configured kubectl ✅\n\n\n" | ||
printf "✅ Configured kubectl\n\n\n" | ||
|
||
printf "Installing helm\n" | ||
printf "🏗️ Installing helm\n" | ||
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash | ||
printf "Installed helm ✅\n\n\n" | ||
printf "✅ Installed helm\n\n\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters