├── .github └── workflows │ └── release.yml ├── README.md ├── artifacthub-repo.yml ├── charts └── mycloudchart1 │ ├── .helmignore │ ├── Chart.yaml │ ├── README.md │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ └── service.yaml │ └── values.yaml └── git-deploy.sh /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release Charts 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | release: 10 | permissions: 11 | contents: write 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v3 16 | with: 17 | fetch-depth: 0 18 | 19 | - name: Configure Git 20 | run: | 21 | git config user.name "$GITHUB_ACTOR" 22 | git config user.email "$GITHUB_ACTOR@users.noreply.github.com" 23 | 24 | - name: Run chart-releaser 25 | uses: helm/chart-releaser-action@v1.5.0 26 | env: 27 | CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cloud-helm-charts 2 | Cloud Helm Charts - AWS EKS, Azure AKS and Google GKE 3 | -------------------------------------------------------------------------------- /artifacthub-repo.yml: -------------------------------------------------------------------------------- 1 | # Artifact Hub repository metadata file 2 | # 3 | # Some settings like the verified publisher flag or the ignored packages won't 4 | # be applied until the next time the repository is processed. Please keep in 5 | # mind that the repository won't be processed if it has not changed since the 6 | # last time it was processed. Depending on the repository kind, this is checked 7 | # in a different way. For Helm http based repositories, we consider it has 8 | # changed if the `index.yaml` file changes. For git based repositories, it does 9 | # when the hash of the last commit in the branch you set up changes. This does 10 | # NOT apply to ownership claim operations, which are processed immediately. 11 | # 12 | #repositoryID: The ID of the Artifact Hub repository where the packages will be published to (optional, but it enables verified publisher) 13 | repositoryID: 89dce37d-a651-4521-b10e-a3ad041c8d14 14 | owners: # (optional, used to claim repository ownership) 15 | - name: Kalyan Reddy Daida 16 | email: stacksimplify@gmail.com 17 | ignore: # (optional, packages that should not be indexed by Artifact Hub) 18 | - name: package1 19 | - name: package2 # Exact match 20 | version: beta # Regular expression (when omitted, all versions are ignored) -------------------------------------------------------------------------------- /charts/mycloudchart1/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/mycloudchart1/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: "0.4.0" 3 | description: StackSimplify Cloud Helm Chart Contains a Kubernetes Load Balancer and Deployment. 4 | name: mycloudchart1 5 | type: application 6 | version: 0.4.0 7 | -------------------------------------------------------------------------------- /charts/mycloudchart1/README.md: -------------------------------------------------------------------------------- 1 | # StackSimplify Simple Helm Chart 2 | 3 | ## Step-00: Introduction 4 | - This Helm Chart will deploy the following Resources 5 | 1. Kubernetes Load Balancer 6 | 2. Kubernetes Deployment 7 | 8 | ## Step-01: Add Custom Helm Repo 9 | ```t 10 | # List Helm Repositories 11 | helm repo list 12 | 13 | # Add Helm Repository 14 | helm repo add 15 | helm repo add stacksimplify https://stacksimplify.github.io/cloud-helm-charts/ 16 | 17 | # List Helm Repositories 18 | helm repo list 19 | 20 | # Search Helm Repository 21 | helm search repo 22 | helm search repo mycloudchart1 23 | ``` 24 | 25 | ## Step-02: Install Helm Chart from our Custom Helm Repository 26 | ```t 27 | # Install myapp1 Helm Chart 28 | helm install 29 | helm install myapp1 stacksimplify/mycloudchart1 30 | ``` 31 | ## Step-03: List Resources and Access Application in Browser 32 | ```t 33 | # List Helm Release 34 | helm ls 35 | or 36 | helm list 37 | 38 | # helm status 39 | helm status myapp1 --show-resources 40 | 41 | # List Pods 42 | kubectl get pods 43 | 44 | # List Services 45 | kubectl get svc 46 | 47 | # Access Application 48 | http://localhost 49 | ``` -------------------------------------------------------------------------------- /charts/mycloudchart1/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | 1. Get the application URL by running these commands: 2 | {{- if contains "NodePort" .Values.service.type }} 3 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "mycloudchart1.fullname" . }}) 4 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 5 | echo http://$NODE_IP:$NODE_PORT 6 | {{- else if contains "LoadBalancer" .Values.service.type }} 7 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 8 | You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "mycloudchart1.fullname" . }}' 9 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "mycloudchart1.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") 10 | echo http://$SERVICE_IP:{{ .Values.service.port }} 11 | {{- else if contains "ClusterIP" .Values.service.type }} 12 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "mycloudchart1.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 13 | export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") 14 | echo "Visit http://127.0.0.1:8080 to use your application" 15 | kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT 16 | {{- end }} 17 | -------------------------------------------------------------------------------- /charts/mycloudchart1/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* 2 | Expand the name of the chart. 3 | */}} 4 | {{- define "mycloudchart1.name" -}} 5 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 6 | {{- end }} 7 | 8 | {{/* 9 | Create a default fully qualified app name. 10 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 11 | If release name contains chart name it will be used as a full name. 12 | */}} 13 | {{- define "mycloudchart1.fullname" -}} 14 | {{- if .Values.fullnameOverride }} 15 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 16 | {{- else }} 17 | {{- $name := default .Chart.Name .Values.nameOverride }} 18 | {{- if contains $name .Release.Name }} 19 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 20 | {{- else }} 21 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 22 | {{- end }} 23 | {{- end }} 24 | {{- end }} 25 | 26 | {{/* 27 | Create chart name and version as used by the chart label. 28 | */}} 29 | {{- define "mycloudchart1.chart" -}} 30 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 31 | {{- end }} 32 | 33 | {{/* 34 | Common labels 35 | */}} 36 | {{- define "mycloudchart1.labels" -}} 37 | helm.sh/chart: {{ include "mycloudchart1.chart" . }} 38 | {{ include "mycloudchart1.selectorLabels" . }} 39 | {{- if .Chart.AppVersion }} 40 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 41 | {{- end }} 42 | app.kubernetes.io/managed-by: {{ .Release.Service }} 43 | {{- end }} 44 | 45 | {{/* 46 | Selector labels 47 | */}} 48 | {{- define "mycloudchart1.selectorLabels" -}} 49 | app.kubernetes.io/name: {{ include "mycloudchart1.name" . }} 50 | app.kubernetes.io/instance: {{ .Release.Name }} 51 | {{- end }} 52 | -------------------------------------------------------------------------------- /charts/mycloudchart1/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "mycloudchart1.fullname" . }} 5 | labels: 6 | {{- include "mycloudchart1.labels" . | nindent 4 }} 7 | spec: 8 | replicas: {{ .Values.replicaCount }} 9 | selector: 10 | matchLabels: 11 | {{- include "mycloudchart1.selectorLabels" . | nindent 6 }} 12 | template: 13 | metadata: 14 | {{- with .Values.podAnnotations }} 15 | annotations: 16 | {{- toYaml . | nindent 8 }} 17 | {{- end }} 18 | labels: 19 | {{- include "mycloudchart1.selectorLabels" . | nindent 8 }} 20 | spec: 21 | {{- with .Values.imagePullSecrets }} 22 | imagePullSecrets: 23 | {{- toYaml . | nindent 8 }} 24 | {{- end }} 25 | securityContext: 26 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 27 | containers: 28 | - name: {{ .Chart.Name }} 29 | securityContext: 30 | {{- toYaml .Values.securityContext | nindent 12 }} 31 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 32 | imagePullPolicy: {{ .Values.image.pullPolicy }} 33 | ports: 34 | - name: http 35 | containerPort: {{ .Values.service.port }} 36 | protocol: TCP 37 | livenessProbe: 38 | httpGet: 39 | path: / 40 | port: http 41 | readinessProbe: 42 | httpGet: 43 | path: / 44 | port: http 45 | resources: 46 | {{- toYaml .Values.resources | nindent 12 }} 47 | {{- with .Values.nodeSelector }} 48 | nodeSelector: 49 | {{- toYaml . | nindent 8 }} 50 | {{- end }} 51 | {{- with .Values.affinity }} 52 | affinity: 53 | {{- toYaml . | nindent 8 }} 54 | {{- end }} 55 | {{- with .Values.tolerations }} 56 | tolerations: 57 | {{- toYaml . | nindent 8 }} 58 | {{- end }} 59 | -------------------------------------------------------------------------------- /charts/mycloudchart1/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "mycloudchart1.fullname" . }} 5 | labels: 6 | {{- include "mycloudchart1.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | nodePort: {{ .Values.service.nodePort }} 15 | selector: 16 | {{- include "mycloudchart1.selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /charts/mycloudchart1/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for mycloudchart1 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ghcr.io/stacksimplify/kubenginxhelm 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | podAnnotations: {} 17 | podSecurityContext: {} 18 | # fsGroup: 2000 19 | 20 | securityContext: {} 21 | # capabilities: 22 | # drop: 23 | # - ALL 24 | # readOnlyRootFilesystem: true 25 | # runAsNonRoot: true 26 | # runAsUser: 1000 27 | 28 | service: 29 | type: LoadBalancer 30 | port: 80 31 | 32 | 33 | resources: {} 34 | # We usually recommend not to specify default resources and to leave this as a conscious 35 | # choice for the user. This also increases chances charts run on environments with little 36 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 37 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 38 | # limits: 39 | # cpu: 100m 40 | # memory: 128Mi 41 | # requests: 42 | # cpu: 100m 43 | # memory: 128Mi 44 | 45 | nodeSelector: {} 46 | 47 | tolerations: [] 48 | 49 | affinity: {} 50 | -------------------------------------------------------------------------------- /git-deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Add files and do local commit" 4 | git add . 5 | git commit -am "Welcome to StackSimplify" 6 | 7 | echo "Pushing to Github Repository" 8 | git push 9 | --------------------------------------------------------------------------------