From 80aa28c6abc3414b6f241412933ab1bebe69ffd1 Mon Sep 17 00:00:00 2001 From: Kyriakos Akriotis Date: Mon, 27 May 2024 23:28:23 +0200 Subject: [PATCH 1/3] added helm chart gh action --- .github/workflows/releases.yml | 26 ++++ Makefile | 2 +- charts/sleepcycles/.helmignore | 23 ++++ charts/sleepcycles/Chart.yaml | 21 +++ charts/sleepcycles/templates/_helpers.tpl | 62 +++++++++ charts/sleepcycles/templates/deployment.yaml | 66 +++++++++ .../templates/leader-election-rbac.yaml | 53 ++++++++ .../sleepcycles/templates/manager-config.yaml | 9 ++ .../sleepcycles/templates/manager-rbac.yaml | 127 ++++++++++++++++++ .../templates/metrics-reader-rbac.yaml | 11 ++ .../templates/metrics-service.yaml | 14 ++ charts/sleepcycles/templates/proxy-rbac.yaml | 34 +++++ .../sleepcycles/templates/serviceaccount.yaml | 8 ++ .../sleepcycles/templates/sleepcycle-crd.yaml | 113 ++++++++++++++++ charts/sleepcycles/values.yaml | 76 +++++++++++ 15 files changed, 644 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/releases.yml create mode 100644 charts/sleepcycles/.helmignore create mode 100644 charts/sleepcycles/Chart.yaml create mode 100644 charts/sleepcycles/templates/_helpers.tpl create mode 100644 charts/sleepcycles/templates/deployment.yaml create mode 100644 charts/sleepcycles/templates/leader-election-rbac.yaml create mode 100644 charts/sleepcycles/templates/manager-config.yaml create mode 100644 charts/sleepcycles/templates/manager-rbac.yaml create mode 100644 charts/sleepcycles/templates/metrics-reader-rbac.yaml create mode 100644 charts/sleepcycles/templates/metrics-service.yaml create mode 100644 charts/sleepcycles/templates/proxy-rbac.yaml create mode 100644 charts/sleepcycles/templates/serviceaccount.yaml create mode 100644 charts/sleepcycles/templates/sleepcycle-crd.yaml create mode 100644 charts/sleepcycles/values.yaml diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml new file mode 100644 index 0000000..da763df --- /dev/null +++ b/.github/workflows/releases.yml @@ -0,0 +1,26 @@ +name: Release Charts +on: + push: + branches: + - main + +jobs: + chart-release: + permissions: + contents: write + 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 "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.6.0 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/Makefile b/Makefile index 4ec7ad4..8190b0a 100644 --- a/Makefile +++ b/Makefile @@ -144,4 +144,4 @@ $(HELMIFY): $(LOCALBIN) test -s $(LOCALBIN)/helmify || GOBIN=$(LOCALBIN) go install github.com/arttor/helmify/cmd/helmify@latest helm: manifests kustomize helmify - $(KUSTOMIZE) build config/default | $(HELMIFY) config/helm \ No newline at end of file + $(KUSTOMIZE) build config/default | $(HELMIFY) charts/sleepcycles \ No newline at end of file diff --git a/charts/sleepcycles/.helmignore b/charts/sleepcycles/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/sleepcycles/.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/sleepcycles/Chart.yaml b/charts/sleepcycles/Chart.yaml new file mode 100644 index 0000000..f9368b4 --- /dev/null +++ b/charts/sleepcycles/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +name: sleepcycles +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. +# It is recommended to use it with quotes. +appVersion: "0.1.2" diff --git a/charts/sleepcycles/templates/_helpers.tpl b/charts/sleepcycles/templates/_helpers.tpl new file mode 100644 index 0000000..3e2e076 --- /dev/null +++ b/charts/sleepcycles/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "sleepcycles.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 "sleepcycles.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 "sleepcycles.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "sleepcycles.labels" -}} +helm.sh/chart: {{ include "sleepcycles.chart" . }} +{{ include "sleepcycles.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "sleepcycles.selectorLabels" -}} +app.kubernetes.io/name: {{ include "sleepcycles.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "sleepcycles.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "sleepcycles.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/sleepcycles/templates/deployment.yaml b/charts/sleepcycles/templates/deployment.yaml new file mode 100644 index 0000000..7a2ca9a --- /dev/null +++ b/charts/sleepcycles/templates/deployment.yaml @@ -0,0 +1,66 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "sleepcycles.fullname" . }}-controller-manager + labels: + control-plane: controller-manager + {{- include "sleepcycles.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.controllerManager.replicas }} + selector: + matchLabels: + control-plane: controller-manager + {{- include "sleepcycles.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + control-plane: controller-manager + {{- include "sleepcycles.selectorLabels" . | nindent 8 }} + annotations: + kubectl.kubernetes.io/default-container: manager + spec: + containers: + - args: {{- toYaml .Values.controllerManager.kubeRbacProxy.args | nindent 8 }} + env: + - name: KUBERNETES_CLUSTER_DOMAIN + value: {{ quote .Values.kubernetesClusterDomain }} + image: {{ .Values.controllerManager.kubeRbacProxy.image.repository }}:{{ .Values.controllerManager.kubeRbacProxy.image.tag + | default .Chart.AppVersion }} + name: kube-rbac-proxy + ports: + - containerPort: 8443 + name: https + protocol: TCP + resources: {{- toYaml .Values.controllerManager.kubeRbacProxy.resources | nindent + 10 }} + securityContext: {{- toYaml .Values.controllerManager.kubeRbacProxy.containerSecurityContext + | nindent 10 }} + - args: {{- toYaml .Values.controllerManager.manager.args | nindent 8 }} + command: + - /manager + env: + - name: KUBERNETES_CLUSTER_DOMAIN + value: {{ quote .Values.kubernetesClusterDomain }} + image: {{ .Values.controllerManager.manager.image.repository }}:{{ .Values.controllerManager.manager.image.tag + | default .Chart.AppVersion }} + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: manager + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: {{- toYaml .Values.controllerManager.manager.resources | nindent 10 + }} + securityContext: {{- toYaml .Values.controllerManager.manager.containerSecurityContext + | nindent 10 }} + securityContext: + runAsNonRoot: true + serviceAccountName: {{ include "sleepcycles.fullname" . }}-controller-manager + terminationGracePeriodSeconds: 10 \ No newline at end of file diff --git a/charts/sleepcycles/templates/leader-election-rbac.yaml b/charts/sleepcycles/templates/leader-election-rbac.yaml new file mode 100644 index 0000000..522348f --- /dev/null +++ b/charts/sleepcycles/templates/leader-election-rbac.yaml @@ -0,0 +1,53 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "sleepcycles.fullname" . }}-leader-election-role + labels: + {{- include "sleepcycles.labels" . | nindent 4 }} +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "sleepcycles.fullname" . }}-leader-election-rolebinding + labels: + {{- include "sleepcycles.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: '{{ include "sleepcycles.fullname" . }}-leader-election-role' +subjects: +- kind: ServiceAccount + name: '{{ include "sleepcycles.fullname" . }}-controller-manager' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/charts/sleepcycles/templates/manager-config.yaml b/charts/sleepcycles/templates/manager-config.yaml new file mode 100644 index 0000000..cf1bb73 --- /dev/null +++ b/charts/sleepcycles/templates/manager-config.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "sleepcycles.fullname" . }}-manager-config + labels: + {{- include "sleepcycles.labels" . | nindent 4 }} +data: + controller_manager_config.yaml: {{ .Values.managerConfig.controllerManagerConfigYaml + | toYaml | indent 1 }} \ No newline at end of file diff --git a/charts/sleepcycles/templates/manager-rbac.yaml b/charts/sleepcycles/templates/manager-rbac.yaml new file mode 100644 index 0000000..5c85492 --- /dev/null +++ b/charts/sleepcycles/templates/manager-rbac.yaml @@ -0,0 +1,127 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "sleepcycles.fullname" . }}-manager-role + labels: + {{- include "sleepcycles.labels" . | nindent 4 }} +rules: +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +- apiGroups: + - apps + resources: + - deployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - replicasets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - statefulsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - batch + resources: + - cronjobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - replicasets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - core.rekuberate.io + resources: + - sleepcycles + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - core.rekuberate.io + resources: + - sleepcycles/finalizers + verbs: + - update +- apiGroups: + - core.rekuberate.io + resources: + - sleepcycles/status + verbs: + - get + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "sleepcycles.fullname" . }}-manager-rolebinding + labels: + {{- include "sleepcycles.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: '{{ include "sleepcycles.fullname" . }}-manager-role' +subjects: +- kind: ServiceAccount + name: '{{ include "sleepcycles.fullname" . }}-controller-manager' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/charts/sleepcycles/templates/metrics-reader-rbac.yaml b/charts/sleepcycles/templates/metrics-reader-rbac.yaml new file mode 100644 index 0000000..d6c7b63 --- /dev/null +++ b/charts/sleepcycles/templates/metrics-reader-rbac.yaml @@ -0,0 +1,11 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "sleepcycles.fullname" . }}-metrics-reader + labels: + {{- include "sleepcycles.labels" . | nindent 4 }} +rules: +- nonResourceURLs: + - /metrics + verbs: + - get \ No newline at end of file diff --git a/charts/sleepcycles/templates/metrics-service.yaml b/charts/sleepcycles/templates/metrics-service.yaml new file mode 100644 index 0000000..750c1eb --- /dev/null +++ b/charts/sleepcycles/templates/metrics-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "sleepcycles.fullname" . }}-controller-manager-metrics-service + labels: + control-plane: controller-manager + {{- include "sleepcycles.labels" . | nindent 4 }} +spec: + type: {{ .Values.metricsService.type }} + selector: + control-plane: controller-manager + {{- include "sleepcycles.selectorLabels" . | nindent 4 }} + ports: + {{- .Values.metricsService.ports | toYaml | nindent 2 }} \ No newline at end of file diff --git a/charts/sleepcycles/templates/proxy-rbac.yaml b/charts/sleepcycles/templates/proxy-rbac.yaml new file mode 100644 index 0000000..9d28501 --- /dev/null +++ b/charts/sleepcycles/templates/proxy-rbac.yaml @@ -0,0 +1,34 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "sleepcycles.fullname" . }}-proxy-role + labels: + {{- include "sleepcycles.labels" . | nindent 4 }} +rules: +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "sleepcycles.fullname" . }}-proxy-rolebinding + labels: + {{- include "sleepcycles.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: '{{ include "sleepcycles.fullname" . }}-proxy-role' +subjects: +- kind: ServiceAccount + name: '{{ include "sleepcycles.fullname" . }}-controller-manager' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/charts/sleepcycles/templates/serviceaccount.yaml b/charts/sleepcycles/templates/serviceaccount.yaml new file mode 100644 index 0000000..e720ae9 --- /dev/null +++ b/charts/sleepcycles/templates/serviceaccount.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "sleepcycles.fullname" . }}-controller-manager + labels: + {{- include "sleepcycles.labels" . | nindent 4 }} + annotations: + {{- toYaml .Values.controllerManager.serviceAccount.annotations | nindent 4 }} \ No newline at end of file diff --git a/charts/sleepcycles/templates/sleepcycle-crd.yaml b/charts/sleepcycles/templates/sleepcycle-crd.yaml new file mode 100644 index 0000000..4a91aa5 --- /dev/null +++ b/charts/sleepcycles/templates/sleepcycle-crd.yaml @@ -0,0 +1,113 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: sleepcycles.core.rekuberate.io + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + labels: + {{- include "sleepcycles.labels" . | nindent 4 }} +spec: + group: core.rekuberate.io + names: + kind: SleepCycle + listKind: SleepCycleList + plural: sleepcycles + singular: sleepcycle + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.shutdown + name: Shutdown Schedule + type: string + - jsonPath: .spec.shutdownTimeZone + name: Shutdown Timezone + type: string + - jsonPath: .spec.wakeup + name: Wakeup Schedule + type: string + - jsonPath: .spec.wakeupTimeZone + name: Wakeup Timezone + type: string + - jsonPath: .spec.enabled + name: Enabled + type: boolean + - jsonPath: .status.lastRunWasSuccessful + name: Success + type: boolean + - jsonPath: .status.lastRunOperation + name: Last Op + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: SleepCycle is the Schema for the sleepcycles API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: SleepCycleSpec defines the desired state of SleepCycle + properties: + enabled: + type: boolean + shutdown: + pattern: (^((\*\/)?([0-5]?[0-9])((\,|\-|\/)([0-5]?[0-9]))*|\*)\s+((\*\/)?((2[0-3]|1[0-9]|[0-9]|00))((\,|\-|\/)(2[0-3]|1[0-9]|[0-9]|00))*|\*)\s+((\*\/)?([1-9]|[12][0-9]|3[01])((\,|\-|\/)([1-9]|[12][0-9]|3[01]))*|\*)\s+((\*\/)?([1-9]|1[0-2])((\,|\-|\/)([1-9]|1[0-2]))*|\*|(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|des))\s+((\*\/)?[0-6]((\,|\-|\/)[0-6])*|\*|00|(sun|mon|tue|wed|thu|fri|sat))\s*$)|@(annually|yearly|monthly|weekly|daily|hourly|reboot) + type: string + shutdownTimeZone: + default: UTC + type: string + wakeup: + pattern: (^((\*\/)?([0-5]?[0-9])((\,|\-|\/)([0-5]?[0-9]))*|\*)\s+((\*\/)?((2[0-3]|1[0-9]|[0-9]|00))((\,|\-|\/)(2[0-3]|1[0-9]|[0-9]|00))*|\*)\s+((\*\/)?([1-9]|[12][0-9]|3[01])((\,|\-|\/)([1-9]|[12][0-9]|3[01]))*|\*)\s+((\*\/)?([1-9]|1[0-2])((\,|\-|\/)([1-9]|1[0-2]))*|\*|(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|des))\s+((\*\/)?[0-6]((\,|\-|\/)[0-6])*|\*|00|(sun|mon|tue|wed|thu|fri|sat))\s*$)|@(annually|yearly|monthly|weekly|daily|hourly|reboot) + type: string + wakeupTimeZone: + default: UTC + type: string + required: + - enabled + - shutdown + type: object + status: + description: SleepCycleStatus defines the observed state of SleepCycle + properties: + enabled: + type: boolean + lastRunOperation: + type: string + lastRunTime: + format: date-time + type: string + lastRunWasSuccessful: + type: boolean + nextScheduledOp: + type: string + nextScheduledShutdown: + format: date-time + type: string + nextScheduledWakeUp: + format: date-time + type: string + usedBy: + additionalProperties: + type: integer + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/charts/sleepcycles/values.yaml b/charts/sleepcycles/values.yaml new file mode 100644 index 0000000..89d6c2f --- /dev/null +++ b/charts/sleepcycles/values.yaml @@ -0,0 +1,76 @@ +controllerManager: + kubeRbacProxy: + args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=0 + containerSecurityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + image: + repository: gcr.io/kubebuilder/kube-rbac-proxy + tag: v0.13.0 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + manager: + args: + - --health-probe-bind-address=:8081 + - --metrics-bind-address=127.0.0.1:8080 + - --leader-elect + containerSecurityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + image: + repository: akyriako78/rekuberate-io-sleepcycles + tag: 0.1.2 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 10m + memory: 64Mi + replicas: 1 + serviceAccount: + annotations: {} +kubernetesClusterDomain: cluster.local +managerConfig: + controllerManagerConfigYaml: |- + apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 + kind: ControllerManagerConfig + health: + healthProbeBindAddress: :8081 + metrics: + bindAddress: 127.0.0.1:8080 + webhook: + port: 9443 + leaderElection: + leaderElect: true + resourceName: 04cbe4c0.rekuberate.io + # leaderElectionReleaseOnCancel defines if the leader should step down volume + # when the Manager ends. This requires the binary to immediately end when the + # Manager is stopped, otherwise, this setting is unsafe. Setting this significantly + # speeds up voluntary leader transitions as the new leader don't have to wait + # LeaseDuration time first. + # In the default scaffold provided, the program ends immediately after + # the manager stops, so would be fine to enable this option. However, + # if you are doing or is intended to do any operation such as perform cleanups + # after the manager stops then its usage might be unsafe. + # leaderElectionReleaseOnCancel: true +metricsService: + ports: + - name: https + port: 8443 + protocol: TCP + targetPort: https + type: ClusterIP From 5ac0333df71a0e147ce6a5ec02a01d1db3407543 Mon Sep 17 00:00:00 2001 From: Kyriakos Akriotis Date: Mon, 27 May 2024 23:31:10 +0200 Subject: [PATCH 2/3] updated helm chart version --- charts/sleepcycles/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/sleepcycles/Chart.yaml b/charts/sleepcycles/Chart.yaml index f9368b4..641af71 100644 --- a/charts/sleepcycles/Chart.yaml +++ b/charts/sleepcycles/Chart.yaml @@ -13,7 +13,7 @@ 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 +version: 0.1.2 # 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. From 7f01de1ea5dc84f15d3c03559d3f370eb16077e9 Mon Sep 17 00:00:00 2001 From: Kyriakos Akriotis Date: Mon, 27 May 2024 23:47:13 +0200 Subject: [PATCH 3/3] changes to README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index be4321e..b06cd67 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,10 @@ or 3. Deploy the controller to the cluster with the image using a **Helm chart**: ```sh -helm install rekuberate-io-sleepcycles config/helm/ +helm repo add sleepcycles https://rekuberate-io.github.io/sleepcycles/ +helm repo update + +helm upgrade --install sleepcycles sleepcycles/sleepcycles -n rekuberate-system --create-namespace ``` 4. Install Instances of Custom Resources: