Skip to content

Commit

Permalink
chore: adjusting chart changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jfavellar90 committed Jul 11, 2023
1 parent 5b755d5 commit 1641938
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 221 deletions.
2 changes: 1 addition & 1 deletion charts/harmony-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
37 changes: 16 additions & 21 deletions charts/harmony-chart/templates/karpenter-provisioner.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
{{- 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 }}
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 }}
{{- 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 }}
57 changes: 39 additions & 18 deletions charts/harmony-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}
Expand All @@ -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
15 changes: 0 additions & 15 deletions tutor-multi-chart/Chart.lock

This file was deleted.

69 changes: 0 additions & 69 deletions tutor-multi-chart/Chart.yml

This file was deleted.

Binary file removed tutor-multi-chart/charts/karpenter-0.16.3.tgz
Binary file not shown.
Binary file removed tutor-multi-chart/charts/prometheus-19.7.2.tgz
Binary file not shown.
37 changes: 0 additions & 37 deletions tutor-multi-chart/templates/karpenter-provisioner.yaml

This file was deleted.

60 changes: 0 additions & 60 deletions tutor-multi-chart/values.yaml

This file was deleted.

0 comments on commit 1641938

Please sign in to comment.