diff --git a/charts/harmony-chart/Chart.yaml b/charts/harmony-chart/Chart.yaml index 0337049..eff0192 100644 --- a/charts/harmony-chart/Chart.yaml +++ b/charts/harmony-chart/Chart.yaml @@ -5,7 +5,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.2.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. diff --git a/charts/harmony-chart/templates/karpenter-provisioner.yaml b/charts/harmony-chart/templates/karpenter-provisioner.yaml index 44e21c1..fa4fe5e 100644 --- a/charts/harmony-chart/templates/karpenter-provisioner.yaml +++ b/charts/harmony-chart/templates/karpenter-provisioner.yaml @@ -1,24 +1,20 @@ -{{- if .Values.karpenter.enabled }} +{{- if .Values.karpenter.enabled -}} apiVersion: karpenter.sh/v1alpha5 kind: Provisioner metadata: - name: {{ .name }} + name: {{ .Values.karpenter.provisioner.name }} namespace: {{ .Release.Namespace | quote }} spec: - requirements: - - key: karpenter.sh/capacity-type - operator: In - values: {{- toYaml .Values.karpenter.requirements.karpenter.sh/capacity-type | nindent 4 }} - - key: node.kubernetes.io/instance-type - operator: In - values: {{- toYaml .Values.karpenter.requirements.node.kubernetes.io/instance-type | nindent 4 }} - - key: kubernetes.io/arch - operator: In - values: {{- toYaml .Values.karpenter.requirements.node.kubernetes.io/arch | nindent 4 }} + {{- if .Values.karpenter.provisioner.spec.requirements }} + requirements: {{ toYaml .Values.karpenter.provisioner.spec.requirements | nindent 4 }} + {{- end }} + {{- if .Values.karpenter.provisioner.spec.limits.resources }} limits: resources: - cpu: {{ .Values.karpenter.limits.resources.cpu . | quote }} - memory: {{ Values.karpenter.limits.resources.memory . | quote }} + {{- range $key, $value := .Values.karpenter.provisioner.spec.limits.resources }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} provider: subnetSelector: karpenter.sh/discovery: {{ .name }} @@ -26,10 +22,9 @@ spec: karpenter.sh/discovery: {{ .name }} tags: karpenter.sh/discovery: {{ .name }} - # If nil, the feature is disabled, nodes will never terminate - # FIX NOTE: confirm that this addressing scheme is correct - ttlSecondsUntilExpired: {{ Values.karpenter.provisioner.ttl-seconds-until-expired }} - # If nil, the feature is disabled, nodes will never scale down due to low utilization - # FIX NOTE: confirm that this addressing scheme is correct - ttlSecondsAfterEmpty: {{ Values.karpenter.provisioner.ttl-seconds-after-empty }} -{{ end }} + {{- if .Values.karpenter.provisioner.spec.provider }} + provider: {{ toYaml .Values.karpenter.provisioner.spec.provider | nindent 4 }} + {{- end }} + ttlSecondsUntilExpired: {{ Values.karpenter.provisioner.spec.ttlSecondsUntilExpired }} + ttlSecondsAfterEmpty: {{ Values.karpenter.provisioner.spec.ttlSecondsAfterEmpty }} +{{- end }} diff --git a/charts/harmony-chart/values.yaml b/charts/harmony-chart/values.yaml index acd0501..a92ed7d 100644 --- a/charts/harmony-chart/values.yaml +++ b/charts/harmony-chart/values.yaml @@ -81,13 +81,10 @@ vpa: prometheus: # add prometheus to the chart by default. Cluster operators who have already # installed prometheus should change this to 'false'. - enabled: true - grafana: - # FIX NOTE: HOW ARE PASSWORDS HANDLED? - admin-password: "" + enabled: false karpenter: # add Karpenter node management for AWS EKS clusters. See: https://karpenter.sh/ - enabled: true + enabled: false # FIX NOTE: CANY ANY OF THESE BE PRESET??? {{- if not .Values.karpenter.clusterName }} {{- fail ".Values.karpenter.clusterName is required" }} @@ -112,16 +109,40 @@ karpenter: # Provide sensible defaults for resource provisioning and lifecycle # --------------------------------------------------------------------------- provisioner: - # ttl in seconds. If nil, the feature is disabled, nodes will never terminate - ttl-seconds-until-expired: 600 - # ttl in seconds. If nil, the feature is disabled, nodes will never scale down - # due to low utilization. - ttl-seconds-after-empty: 600 - limits: - resources: - cpu: "400" # 100 * 4 cpu - memory: "1600Gi" # 100 * 16Gi - requirements: - "karpenter.sh/capacity-type": ["spot", "on-demand"] - "node.kubernetes.io/instance-type": ["t3.large", "t3.xlarge", "t3.2xlarge", "t2.xlarge", "t2.2xlarge"] - "kubernetes.io/arch": ["amd64"] + name: "default" + # Node template reference. using the default one + spec: + # Requirements for the provisioner API. + # More details in https://karpenter.sh/preview/concepts/provisioners/#specrequirements + requirements: [] + # - key: karpenter.sh/capacity-type + # operator: In + # values: ["spot", "on-demand"] + # - key: node.kubernetes.io/instance-type + # operator: In + # values: ["t3.large", "t3.xlarge", "t3.2xlarge", "t2.xlarge", "t2.2xlarge"] + # - key: kubernetes.io/arch + # operator: In + # values: ["amd64"] + # The limits section controls the maximum amount of resources that the provisioner will manage. + # More details in https://karpenter.sh/preview/concepts/provisioners/#speclimitsresources + limits: + resources: + cpu: "400" # 100 * 4 cpu + memory: "1600Gi" # 100 * 16Gi + # This variable covers parameters of the AWS Cloud Provider. + # More details in https://github.com/aws/karpenter/blob/v0.19.3/website/content/en/v0.11.1/AWS/provisioning.md#specprovider + # NOTE: this parameter is no longer supported in newer version of Karpenter. A migration to the new CRD "AWSNodeTemplate" is + # required. Refer to https://github.com/aws/karpenter/blob/v0.19.3/website/content/en/v0.19.1/upgrade-guide/_index.md#upgrading-to-v0130 + # to get further details + aws: {} + provider: {} + # subnetSelector: + # karpenter.sh/discovery: ${CLUSTER_NAME} + # securityGroupSelector: + # karpenter.sh/discovery: ${CLUSTER_NAME} + # TTL in seconds. If nil, the feature is disabled, nodes will never terminate + ttlSecondsUntilExpired: 600 + # TTL in seconds. If nil, the feature is disabled, nodes will never scale down + # due to low utilization. + ttlSecondsAfterEmpty: 600 diff --git a/tutor-multi-chart/Chart.lock b/tutor-multi-chart/Chart.lock deleted file mode 100644 index b09411d..0000000 --- a/tutor-multi-chart/Chart.lock +++ /dev/null @@ -1,15 +0,0 @@ -dependencies: -- name: ingress-nginx - repository: https://kubernetes.github.io/ingress-nginx - version: 4.4.2 -- name: cert-manager - repository: https://charts.jetstack.io - version: v1.11.0 -- name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 19.7.2 -- name: karpenter - repository: https://charts.karpenter.sh - version: 0.16.3 -digest: sha256:4b608810852f7736531411d12870e1f2f17d330e7588996714b5910f810d8917 -generated: "2023-02-27T19:06:55.506069-06:00" diff --git a/tutor-multi-chart/Chart.yml b/tutor-multi-chart/Chart.yml deleted file mode 100644 index e4c31b7..0000000 --- a/tutor-multi-chart/Chart.yml +++ /dev/null @@ -1,69 +0,0 @@ -apiVersion: v2 -name: harmony-chart -description: A Helm chart for deploying multiple Open edX instances onto Kubernetes using Tutor -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. -# -# In our case, this represents the version of Tutor that this chart is compatible with. -appVersion: "14.1.1" -home: https://github.com/openedx/openedx-k8s-harmony -icon: https://logos.openedx.org/open-edx-logo-tag.png -keywords: - - open edx - - kubernetes - - helm -maintainers: - - name: openedx - url: https://github.com/openedx/ -sources: - - https://github.com/openedx/openedx-k8s-harmony - -# ----------------------------------------------------------------------------- -# This is just info for the "helm dependency update" command, which will -# update the ./charts/ directory when run, using this information. -# -# Usage: helm dep update . -# ----------------------------------------------------------------------------- -dependencies: -- name: ingress-nginx - version: "4.4.2" - repository: https://kubernetes.github.io/ingress-nginx - condition: ingress-nginx.enabled - -- name: cert-manager - version: "1.11.0" - repository: https://charts.jetstack.io - condition: cert-manager.enabled - -- name: elasticsearch - version: "7.17.3" - condition: elasticsearch.enabled - repository: https://helm.elastic.co - -- name: metrics-server - version: "~3.8.3" - repository: https://kubernetes-sigs.github.io/metrics-server/ - alias: metricsserver - condition: metricsserver.enabled - -- name: vertical-pod-autoscaler - version: "~6.0.3" - repository: https://cowboysysop.github.io/charts/ - alias: vpa - condition: vpa.enabled - -- name: prometheus - version: "19.7.2" - repository: https://prometheus-community.github.io/helm-charts - condition: prometheus.enabled - -- name: karpenter - version: "0.16.3" - repository: https://charts.karpenter.sh - condition: karpenter.enabled diff --git a/tutor-multi-chart/charts/karpenter-0.16.3.tgz b/tutor-multi-chart/charts/karpenter-0.16.3.tgz deleted file mode 100644 index 228891f..0000000 Binary files a/tutor-multi-chart/charts/karpenter-0.16.3.tgz and /dev/null differ diff --git a/tutor-multi-chart/charts/prometheus-19.7.2.tgz b/tutor-multi-chart/charts/prometheus-19.7.2.tgz deleted file mode 100644 index 0c70c69..0000000 Binary files a/tutor-multi-chart/charts/prometheus-19.7.2.tgz and /dev/null differ diff --git a/tutor-multi-chart/templates/karpenter-provisioner.yaml b/tutor-multi-chart/templates/karpenter-provisioner.yaml deleted file mode 100644 index 8a3bdc4..0000000 --- a/tutor-multi-chart/templates/karpenter-provisioner.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- if .Values.karpenter.enabled }} -apiVersion: karpenter.sh/v1alpha5 -kind: Provisioner -metadata: - name: {{ .name }} - namespace: {{ .Release.Namespace | quote }} -spec: - requirements: - - key: karpenter.sh/capacity-type - operator: In - values: {{- toYaml .Values.karpenter.requirements.karpenter.sh/capacity-type | nindent 4 }} - - key: node.kubernetes.io/instance-type - operator: In - values: {{- toYaml .Values.karpenter.requirements.node.kubernetes.io/instance-type | nindent 4 }} - - key: kubernetes.io/arch - operator: In - values: {{- toYaml .Values.karpenter.requirements.node.kubernetes.io/arch | nindent 4 }} - limits: - resources: - cpu: {{ .Values.karpenter.limits.resources.cpu . | quote }} - memory: {{ Values.karpenter.limits.resources.memory . | quote }} - provider: - subnetSelector: - karpenter.sh/discovery: {{ .name }} - securityGroupSelector: - karpenter.sh/discovery: {{ .name }} - tags: - karpenter.sh/discovery: {{ .name }} - -# If nil, the feature is disabled, nodes will never terminate -# FIX NOTE: confirm that this addressing scheme is correct -ttlSecondsUntilExpired: {{ Values.karpenter.provisioner.ttl-seconds-until-expired }} - -# If nil, the feature is disabled, nodes will never scale down due to low utilization -# FIX NOTE: confirm that this addressing scheme is correct -ttlSecondsAfterEmpty: {{ Values.karpenter.provisioner.ttl-seconds-after-empty }} -{{ end }} \ No newline at end of file diff --git a/tutor-multi-chart/values.yaml b/tutor-multi-chart/values.yaml deleted file mode 100644 index 1a6be49..0000000 --- a/tutor-multi-chart/values.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# Default values for tutor-multi-chart. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -ingress-nginx: - # Use ingress-nginx as a default controller. - enabled: true -cert-manager: - # Use cert-manager as a default certificate controller. - enabled: true - installCRDs: false - # Email address associated with the ACME account. Used to notify about expiring - # certificates. - email: "" -prometheus: - # add prometheus to the chart by default. Cluster operators who have already - # installed prometheus should change this to 'false'. - enabled: true - grafana: - # FIX NOTE: HOW ARE PASSWORDS HANDLED? - admin-password: "" -karpenter: - # add Karpenter node management for AWS EKS clusters. See: https://karpenter.sh/ - enabled: true - # FIX NOTE: CANY ANY OF THESE BE PRESET??? - {{- if not .Values.karpenter.clusterName }} - {{- fail ".Values.karpenter.clusterName is required" }} - {{- end }} - {{- if not .Values.karpenter.clusterEndpoint }} - {{- fail ".Values.karpenter.clusterEndpoint is required" }} - {{- end }} - {{- if not .Values.karpenter.clusterEndpoint }} - {{- fail ".Values.karpenter.serviceAccount.annotations.eks.amazonaws.com/role-arn is required" }} - {{- end }} - {{- if not .Values.karpenter.aws.defaultInstanceProfile }} - {{- fail ".Values.karpenter.aws.defaultInstanceProfile is required" }} - {{- end }} - cluster-name: "" - cluster-endpoint: "" - service-account: - annotations: - "eks.amazonaws.com/role-arn": "" - aws: - default-instance-profile: "" - # --------------------------------------------------------------------------- - # Provide sensible defaults for resource provisioning and lifecycle - # --------------------------------------------------------------------------- - provisioner: - # ttl in seconds. If nil, the feature is disabled, nodes will never terminate - ttl-seconds-until-expired: 600 - # ttl in seconds. If nil, the feature is disabled, nodes will never scale down - # due to low utilization. - ttl-seconds-after-empty: 600 - limits: - resources: - cpu: "400" # 100 * 4 cpu - memory: "1600Gi" # 100 * 16Gi - requirements: - "karpenter.sh/capacity-type": ["spot", "on-demand"] - "node.kubernetes.io/instance-type": ["t3.large", "t3.xlarge", "t3.2xlarge", "t2.xlarge", "t2.2xlarge"] - "kubernetes.io/arch": ["amd64"]