-
Notifications
You must be signed in to change notification settings - Fork 5
Helm chart #5
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
Open
mlladb
wants to merge
8
commits into
ManoManoTech:main
Choose a base branch
from
mlladb:helm-chart2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Helm chart #5
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1f04bf0
charts from https://github.com/afreyermuth98/kubernetes-node-specific…
ab855cd
helm chart stuff
c0a6bcc
publish helm charts
12217e6
release helm chart on push
3d95a46
Don't forget to checkout
c1c5bf4
fix indentation issue
ccad92b
fix service name
447afde
Update readme to refenrece upstream
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 @@ | ||
name: Publish Helm charts | ||
|
||
permissions: {} | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
packages: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Publish Helm charts | ||
uses: stefanprodan/helm-gh-pages@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains hidden or 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 hidden or 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 hidden or 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,13 @@ | ||
apiVersion: v2 | ||
name: node-specific-sizing | ||
description: A Kubernetes controller that helps resize pods created by a DaemonSet depending on the amount of allocatable resources present on the node. | ||
type: application | ||
version: 0.1.0 | ||
appVersion: "0.1.0" | ||
|
||
dependencies: | ||
- name: cert-manager | ||
repository: https://charts.jetstack.io | ||
condition: certmanager.enabled | ||
alias: certmanager | ||
version: "v1.15.3" |
This file contains hidden or 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,76 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "chart.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "chart.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "chart.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "chart.labels" -}} | ||
helm.sh/chart: {{ include "chart.chart" . }} | ||
{{ include "chart.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "chart.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "chart.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/part-of: "node-specific-sizing" | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "chart.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "chart.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Allow the release namespace to be overridden for multi-namespace deployments in combined charts | ||
*/}} | ||
{{- define "chart.namespace" -}} | ||
{{- if .Values.namespaceOverride }} | ||
{{- .Values.namespaceOverride }} | ||
{{- else }} | ||
{{- .Release.Namespace }} | ||
{{- end }} | ||
{{- end }} |
This file contains hidden or 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,16 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ include "chart.fullname" . }}-role | ||
labels: | ||
app.kubernetes.io/component: rbac | ||
{{- include "chart.labels" . | nindent 4 }} | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- nodes | ||
verbs: | ||
- get | ||
- list | ||
- watch |
15 changes: 15 additions & 0 deletions
15
charts/node-specific-sizing/templates/clusterrolebinding.yaml
This file contains hidden or 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,15 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ include "chart.fullname" . }}-rolebinding | ||
labels: | ||
app.kubernetes.io/component: rbac | ||
{{- include "chart.labels" . | nindent 4 }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ include "chart.name" . }}-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "chart.name" . }} | ||
namespace: {{ include "chart.namespace" . }} |
This file contains hidden or 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,43 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "chart.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app.kubernetes.io/component: controller | ||
{{- include "chart.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.replicas }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/component: controller | ||
{{- include "chart.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: controller | ||
{{- include "chart.selectorLabels" . | nindent 8 }} | ||
spec: | ||
serviceAccountName: {{ include "chart.serviceAccountName" . }} | ||
terminationGracePeriodSeconds: 10 | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} | ||
resources: {{- toYaml .Values.resources | nindent 12 }} | ||
imagePullPolicy: {{ default "IfNotPresent" .Values.image.pullPolicy }} | ||
env: | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
volumeMounts: | ||
- mountPath: /tmp/k8s-webhook-server/serving-certs | ||
name: serving-certs | ||
readOnly: true | ||
securityContext: | ||
runAsNonRoot: true | ||
volumes: | ||
- name: serving-certs | ||
secret: | ||
defaultMode: 420 | ||
secretName: {{ include "chart.fullname" . }}-server-cert |
29 changes: 29 additions & 0 deletions
29
charts/node-specific-sizing/templates/mutatingadmissionwebhook.yaml
This file contains hidden or 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,29 @@ | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
name: {{ include "chart.fullname" . }}-webhook | ||
annotations: | ||
cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/{{ include "chart.fullname" . }}-serving-cert' | ||
labels: | ||
{{- include "chart.labels" . | nindent 4 }} | ||
webhooks: | ||
- name: {{ include "chart.fullname" . }}.svc.cluster.local | ||
objectSelector: | ||
matchLabels: | ||
node-specific-sizing.manomano.tech/enabled: "true" | ||
admissionReviewVersions: [ "v1" ] | ||
sideEffects: None | ||
failurePolicy: Ignore | ||
timeoutSeconds: 1 | ||
clientConfig: | ||
service: | ||
namespace: node-specific-sizing | ||
name: {{ include "chart.fullname" . }} | ||
path: /mutate | ||
rules: | ||
- apiGroups: [""] | ||
apiVersions: ["v1"] | ||
resources: ["pods"] | ||
operations: ["CREATE"] | ||
scope: Namespaced | ||
|
16 changes: 16 additions & 0 deletions
16
charts/node-specific-sizing/templates/selfsigned-issuer.yaml
This file contains hidden or 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,16 @@ | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
name: {{ include "chart.fullname" . }}-selfsigned-issuer | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
{{- if .Values.certmanager.enabled }} | ||
helm.sh/hook: post-install,post-upgrade | ||
{{- else }} | ||
helm.sh/hook: pre-install,pre-upgrade | ||
{{- end }} | ||
helm.sh/hook-weight: "1" | ||
labels: | ||
{{- include "chart.labels" . | nindent 4 }} | ||
spec: | ||
selfSigned: {} |
This file contains hidden or 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,17 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "chart.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app.kubernetes.io/component: webhook | ||
{{- include "chart.labels" . | nindent 4 }} | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
{{- include "chart.selectorLabels" . | nindent 4 }} | ||
ports: | ||
- name: "https" | ||
port: 443 | ||
targetPort: 8443 | ||
protocol: TCP |
This file contains hidden or 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,10 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "chart.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app.kubernetes.io/component: rbac | ||
{{- include "chart.labels" . | nindent 4 }} | ||
annotations: | ||
{{- toYaml .Values.serviceAccount.annotations | nindent 4 }} |
This file contains hidden or 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,22 @@ | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: {{ include "chart.fullname" . }}-serving-cert | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
{{- if .Values.certmanager.enabled }} | ||
helm.sh/hook: post-install,post-upgrade | ||
{{- else }} | ||
helm.sh/hook: pre-install,pre-upgrade | ||
{{- end }} | ||
helm.sh/hook-weight: "2" | ||
labels: | ||
{{- include "chart.labels" . | nindent 4 }} | ||
spec: | ||
dnsNames: | ||
- '{{ include "chart.fullname" . }}.{{ .Release.Namespace }}.svc' | ||
- '{{ include "chart.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.kubernetesClusterDomain }}' | ||
issuerRef: | ||
kind: Issuer | ||
name: {{ include "chart.fullname" . }}-selfsigned-issuer | ||
secretName: {{ include "chart.fullname" . }}-server-cert |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow requires a
gh-pages
branch to publish the chart to. Sample https://mlladb.github.io/kubernetes-node-specific-sizing/