Skip to content

Commit

Permalink
feature(chart): add helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
DragonStuff committed Apr 8, 2024
1 parent eba1d68 commit bb2ae94
Show file tree
Hide file tree
Showing 7 changed files with 163 additions and 0 deletions.
15 changes: 15 additions & 0 deletions charts/index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
entries:
ns-object-mirror:
- apiVersion: v2
appVersion: 0.4.0
created: "2024-04-08T13:41:31.359937+09:00"
description: A Helm chart for ns-object-mirror. Copy objects from one Kubernetes
namespace to another using annotations.
digest: f81d804bbe917137be13ead9608bdf1103d253172e9f14c6efdb8ea3f5d05424
name: ns-object-mirror
type: application
urls:
- https://alexandernicholson.github.io/ns-object-mirror/charts/ns-object-mirror-0.4.0.tgz
version: 0.4.0
generated: "2024-04-08T13:41:31.358539+09:00"
Binary file added charts/ns-object-mirror-0.4.0.tgz
Binary file not shown.
23 changes: 23 additions & 0 deletions charts/ns-object-mirror/.helmignore
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/
24 changes: 24 additions & 0 deletions charts/ns-object-mirror/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: ns-object-mirror
description: A Helm chart for ns-object-mirror. Copy objects from one Kubernetes namespace to another using annotations.

# 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.4.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: "0.4.0"
28 changes: 28 additions & 0 deletions charts/ns-object-mirror/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.deploymentName }}
namespace: {{ .Values.namespace }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Values.deploymentName }}
template:
metadata:
labels: {{ .Values.labels }}
annotations: {{ .Values.annotations }}
spec:
serviceAccountName: {{ .Values.serviceAccount.name }}
securityContext: {{ .Values.securityContext }}
containers:
- name: ns-object-mirror
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources: {{ .Values.resources }}
securityContext: {{ .Values.containerSecurityContext }}
nodeSelector: {{ .Values.nodeSelector }}
tolerations: {{ .Values.tolerations }}
affinity: {{ .Values.affinity }}
---
28 changes: 28 additions & 0 deletions charts/ns-object-mirror/templates/rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccount.name }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ .Values.serviceAccount.name }}
rules:
- apiGroups: [""]
resources: ["configmaps", "secrets", "namespaces"]
verbs: ["get", "list", "create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ .Values.serviceAccount.name }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ .Values.serviceAccount.name }}
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceAccount.name }}
namespace: {{ .Values.namespace }}
---
45 changes: 45 additions & 0 deletions charts/ns-object-mirror/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Default values for ns-object-mirror.

replicaCount: 1

image:
repository: ghcr.io/alexandernicholson/ns-object-mirror
pullPolicy: IfNotPresent
tag: main

deploymentName: "ns-object-mirror"
namespace: "default"

serviceAccount:
name: "ns-object-mirror"
create: true
extraAnnotations: {}

podAnnotations: {}
podLabels:
app: ns-object-mirror

podSecurityContext: {}
# fsGroup: 2000

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}

0 comments on commit bb2ae94

Please sign in to comment.