Skip to content

Commit

Permalink
Define pingdom-operator chart
Browse files Browse the repository at this point in the history
  • Loading branch information
nefelim4ag committed Aug 3, 2022
1 parent 62be28b commit 1096d01
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/chart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release Chart

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.9.2

- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: helm
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
6 changes: 6 additions & 0 deletions helm/pingdom-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
name: pingdom-operator
description: A Helm chart for Kubernetes
type: application
version: 0.0.1
appVersion: 0.0.1
60 changes: 60 additions & 0 deletions helm/pingdom-operator/templates/deploy.yaml.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Release.Name }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ .Release.Namespace }}-{{ .Release.Name }}
rules:
- apiGroups: [""]
resources: ["ingress"]
verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ .Release.Namespace }}-{{ .Release.Name }}
subjects:
- kind: ServiceAccount
name: {{ .Release.Name }}
apiGroup: ""
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ .Release.Namespace }}-{{ .Release.Name }}
apiGroup: ""
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Release.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}
spec:
serviceAccountName: {{ .Release.Name }}
serviceAccount: {{ .Release.Name }}
containers:
- name: {{ .Release.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- with .Values.env }}
{{- range $key, $value := . }}
- name: {{ $key }}
{{- if kindIs "string" $value }}
value: {{ tpl (toYaml $value) $ }}
{{- else }}
{{- tpl (toYaml $value) $ | nindent 12 }}
{{- end }}
{{- end }}
{{- end }}
resources: {{ .Values.resources | toJson }}
25 changes: 25 additions & 0 deletions helm/pingdom-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
image:
repository: docker pull ghcr.io/nefelim4ag/pingdom-operator
tag: 0.0.1
pullPolicy: IfNotPresent
imagePullSecrets: []

strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 5%
maxUnavailable: 10%

resources:
requests:
cpu: "10m"
memory: 32Mi

env:
CLUSTER_NAME: "default-cluster"
DRY_RUN: "False"
BEARER_TOKEN: ""

hostNetwork: true

dnsConfig: {}

0 comments on commit 1096d01

Please sign in to comment.