diff --git a/charts/index.yaml b/charts/index.yaml new file mode 100644 index 0000000..9ecf1c0 --- /dev/null +++ b/charts/index.yaml @@ -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" diff --git a/charts/ns-object-mirror-0.4.0.tgz b/charts/ns-object-mirror-0.4.0.tgz new file mode 100644 index 0000000..5671db9 Binary files /dev/null and b/charts/ns-object-mirror-0.4.0.tgz differ diff --git a/charts/ns-object-mirror/.helmignore b/charts/ns-object-mirror/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/ns-object-mirror/.helmignore @@ -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/ diff --git a/charts/ns-object-mirror/Chart.yaml b/charts/ns-object-mirror/Chart.yaml new file mode 100644 index 0000000..89e63a1 --- /dev/null +++ b/charts/ns-object-mirror/Chart.yaml @@ -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" diff --git a/charts/ns-object-mirror/templates/deployment.yaml b/charts/ns-object-mirror/templates/deployment.yaml new file mode 100644 index 0000000..af5b83c --- /dev/null +++ b/charts/ns-object-mirror/templates/deployment.yaml @@ -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 }} +--- diff --git a/charts/ns-object-mirror/templates/rbac.yaml b/charts/ns-object-mirror/templates/rbac.yaml new file mode 100644 index 0000000..8e78a0f --- /dev/null +++ b/charts/ns-object-mirror/templates/rbac.yaml @@ -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 }} +--- diff --git a/charts/ns-object-mirror/values.yaml b/charts/ns-object-mirror/values.yaml new file mode 100644 index 0000000..dd372c6 --- /dev/null +++ b/charts/ns-object-mirror/values.yaml @@ -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: {}