From 954379b0cfe245261131e76dd058746b1f4dd7e2 Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Fri, 4 Dec 2020 11:15:53 -0300 Subject: [PATCH] Added aws-wfs-csi-pv-provisioner rancher chart --- .../v0.1.0/.helmignore | 23 +++++++ .../v0.1.0/Chart.yaml | 23 +++++++ .../v0.1.0/README.md | 5 ++ .../v0.1.0/templates/NOTES.txt | 1 + .../v0.1.0/templates/_helpers.tpl | 63 +++++++++++++++++++ .../templates/cluster-role-binding.yaml | 12 ++++ .../v0.1.0/templates/cluster-role.yaml | 23 +++++++ .../v0.1.0/templates/deployment.yaml | 59 +++++++++++++++++ .../v0.1.0/templates/pv.yaml | 17 +++++ .../v0.1.0/templates/pvc.yaml | 13 ++++ .../v0.1.0/templates/role-binding.yaml | 17 +++++ .../v0.1.0/templates/role.yaml | 14 +++++ .../v0.1.0/templates/serviceaccount.yaml | 12 ++++ .../v0.1.0/templates/storage-class.yaml | 6 ++ .../v0.1.0/values.yaml | 59 +++++++++++++++++ 15 files changed, 347 insertions(+) create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/.helmignore create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/Chart.yaml create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/README.md create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/NOTES.txt create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/_helpers.tpl create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/cluster-role-binding.yaml create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/cluster-role.yaml create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/deployment.yaml create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/pv.yaml create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/pvc.yaml create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/role-binding.yaml create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/role.yaml create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/serviceaccount.yaml create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/storage-class.yaml create mode 100644 charts/aws-efs-csi-pv-provisioner/v0.1.0/values.yaml diff --git a/charts/aws-efs-csi-pv-provisioner/v0.1.0/.helmignore b/charts/aws-efs-csi-pv-provisioner/v0.1.0/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/.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/aws-efs-csi-pv-provisioner/v0.1.0/Chart.yaml b/charts/aws-efs-csi-pv-provisioner/v0.1.0/Chart.yaml new file mode 100644 index 0000000..8639c38 --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/Chart.yaml @@ -0,0 +1,23 @@ +apiVersion: v2 +name: aws-efs-csi-pv-provisioner +description: A Helm chart for Kubernetes + +# 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.1.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. +appVersion: 0.1.0 diff --git a/charts/aws-efs-csi-pv-provisioner/v0.1.0/README.md b/charts/aws-efs-csi-pv-provisioner/v0.1.0/README.md new file mode 100644 index 0000000..6295be5 --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/README.md @@ -0,0 +1,5 @@ +# LogMeIn AWS EFS CSI PV provisioner Chart + +This chart installs LogMeIn [AWS CSI Driver PV Provisioner](https://github.com/LogMeIn/aws-efs-csi-pv-provisioner). This Rancher chart is based on work by [Signifly](https://github.com/signifly/aws-efs-csi-pv-provisioner/tree/master/helm). + + diff --git a/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/NOTES.txt b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/NOTES.txt new file mode 100644 index 0000000..a099036 --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/NOTES.txt @@ -0,0 +1 @@ +TBD diff --git a/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/_helpers.tpl b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/_helpers.tpl new file mode 100644 index 0000000..2138b53 --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "aws-efs-csi-pv-provisioner.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 "aws-efs-csi-pv-provisioner.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 "aws-efs-csi-pv-provisioner.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "aws-efs-csi-pv-provisioner.labels" -}} +helm.sh/chart: {{ include "aws-efs-csi-pv-provisioner.chart" . }} +{{ include "aws-efs-csi-pv-provisioner.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "aws-efs-csi-pv-provisioner.selectorLabels" -}} +app.kubernetes.io/name: {{ include "aws-efs-csi-pv-provisioner.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "aws-efs-csi-pv-provisioner.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "aws-efs-csi-pv-provisioner.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/cluster-role-binding.yaml b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/cluster-role-binding.yaml new file mode 100644 index 0000000..2be0cb5 --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/cluster-role-binding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "aws-efs-csi-pv-provisioner.serviceAccountName" . }} +subjects: + - kind: ServiceAccount + name: {{ include "aws-efs-csi-pv-provisioner.serviceAccountName" . }} + namespace: kube-system +roleRef: + kind: ClusterRole + name: {{ include "aws-efs-csi-pv-provisioner.serviceAccountName" . }} + apiGroup: rbac.authorization.k8s.io diff --git a/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/cluster-role.yaml b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/cluster-role.yaml new file mode 100644 index 0000000..c7e840c --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/cluster-role.yaml @@ -0,0 +1,23 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "aws-efs-csi-pv-provisioner.serviceAccountName" . }} + labels: + {{- include "aws-efs-csi-pv-provisioner.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +rules: + - apiGroups: [""] + resources: ["persistentvolumes"] + verbs: ["get", "list", "watch", "create", "delete"] + - apiGroups: [""] + resources: ["persistentvolumeclaims"] + verbs: ["get", "list", "watch", "update"] + - apiGroups: ["storage.k8s.io"] + resources: ["storageclasses"] + verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["events"] + verbs: ["create", "update", "patch"] diff --git a/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/deployment.yaml b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/deployment.yaml new file mode 100644 index 0000000..d42bfc2 --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/deployment.yaml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "aws-efs-csi-pv-provisioner.fullname" . }} + labels: + {{- include "aws-efs-csi-pv-provisioner.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "aws-efs-csi-pv-provisioner.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "aws-efs-csi-pv-provisioner.selectorLabels" . | nindent 8 }} + spec: + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml .Values.imagePullSecrets | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "aws-efs-csi-pv-provisioner.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + - -file-system-id={{ .Values.fileSystemId }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + volumeMounts: + - mountPath: /efs + name: efs + volumes: + - name: efs + persistentVolumeClaim: + claimName: {{ include "aws-efs-csi-pv-provisioner.fullname" . }}-root + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/pv.yaml b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/pv.yaml new file mode 100644 index 0000000..4ac9bf2 --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/pv.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: {{ include "aws-efs-csi-pv-provisioner.fullname" . }}-root + labels: + {{- include "aws-efs-csi-pv-provisioner.labels" . | nindent 4 }} +spec: + capacity: + storage: 1Mi + volumeMode: Filesystem + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + storageClassName: efs-sc + csi: + driver: efs.csi.aws.com + volumeHandle: {{ .Values.fileSystemId }} diff --git a/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/pvc.yaml b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/pvc.yaml new file mode 100644 index 0000000..12a05b7 --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/pvc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ include "aws-efs-csi-pv-provisioner.fullname" . }}-root + labels: + {{- include "aws-efs-csi-pv-provisioner.labels" . | nindent 4 }} +spec: + accessModes: + - ReadWriteMany + storageClassName: efs-sc + resources: + requests: + storage: 1Mi diff --git a/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/role-binding.yaml b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/role-binding.yaml new file mode 100644 index 0000000..2886926 --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/role-binding.yaml @@ -0,0 +1,17 @@ +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ include "aws-efs-csi-pv-provisioner.serviceAccountName" . }} + labels: + {{- include "aws-efs-csi-pv-provisioner.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +subjects: + - kind: ServiceAccount + name: {{ include "aws-efs-csi-pv-provisioner.serviceAccountName" . }} +roleRef: + kind: Role + name: {{ include "aws-efs-csi-pv-provisioner.serviceAccountName" . }} + apiGroup: rbac.authorization.k8s.io diff --git a/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/role.yaml b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/role.yaml new file mode 100644 index 0000000..5fb4ad6 --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/role.yaml @@ -0,0 +1,14 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "aws-efs-csi-pv-provisioner.serviceAccountName" . }} + labels: + {{- include "aws-efs-csi-pv-provisioner.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +rules: + - apiGroups: [""] + resources: ["endpoints"] + verbs: ["get", "list", "watch", "create", "update", "patch"] diff --git a/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/serviceaccount.yaml b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/serviceaccount.yaml new file mode 100644 index 0000000..88bd8ce --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "aws-efs-csi-pv-provisioner.serviceAccountName" . }} + labels: + {{- include "aws-efs-csi-pv-provisioner.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/storage-class.yaml b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/storage-class.yaml new file mode 100644 index 0000000..58838c2 --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/templates/storage-class.yaml @@ -0,0 +1,6 @@ +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: efs +provisioner: aws.k8s.logmein.com/efs-csi-pv-provisioner +reclaimPolicy: Retain diff --git a/charts/aws-efs-csi-pv-provisioner/v0.1.0/values.yaml b/charts/aws-efs-csi-pv-provisioner/v0.1.0/values.yaml new file mode 100644 index 0000000..10ee6c3 --- /dev/null +++ b/charts/aws-efs-csi-pv-provisioner/v0.1.0/values.yaml @@ -0,0 +1,59 @@ +# Default values for aws-efs-csi-pv-provisioner. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +fileSystemId: '' + +image: + repository: "" + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: [] + +priorityClassName: "" +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {}