From 5a066d0bab064d47bf59d4dc4588fc1cf9fb1bfd Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Wed, 4 Oct 2023 15:01:08 -0400 Subject: [PATCH 01/63] Add Controller Helm chart and add it as dependency --- charts/cloudhealth-collector/Chart.yaml | 4 +- .../.helmignore | 23 ++ .../Chart.yaml | 21 ++ .../templates/_helpers.tpl | 62 +++++ .../templates/deployment.yaml | 103 +++++++++ .../templates/leader-election-rbac.yaml | 59 +++++ .../templates/manager-rbac.yaml | 102 ++++++++ .../templates/metrics-reader-rbac.yaml | 14 ++ .../templates/metrics-service.yaml | 17 ++ .../templates/proxy-rbac.yaml | 40 ++++ .../templates/recommendation-crd.yaml | 217 ++++++++++++++++++ .../recommendationdeploymentsetting-crd.yaml | 167 ++++++++++++++ .../values.yaml | 42 ++++ charts/cloudhealth-collector/values.yaml | 3 + 14 files changed, 872 insertions(+), 2 deletions(-) create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/.helmignore create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/Chart.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/_helpers.tpl create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/deployment.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/leader-election-rbac.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/manager-rbac.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-reader-rbac.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-service.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/proxy-rbac.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendation-crd.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendationdeploymentsetting-crd.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 025319d..5bcd4cc 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -3,9 +3,9 @@ apiVersion: v2 name: cloudhealth-collector -description: A Helm chart for CloudHealth's Kubernetes Collector Agent +description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 4.1.0 +version: 5.0.0-beta appVersion: "5.0.0" home: https://cloudhealth.vmware.com/ sources: diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/.helmignore b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/.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/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/Chart.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/Chart.yaml new file mode 100644 index 0000000..e22fd43 --- /dev/null +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +name: cloudhealth-optimization-controller +description: A Helm chart for CloudHealth Optimization Controller +# 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.1 +# 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.1" diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/_helpers.tpl b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/_helpers.tpl new file mode 100644 index 0000000..3c5d167 --- /dev/null +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "k8s-optimization.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 "k8s-optimization.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 "k8s-optimization.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "k8s-optimization.labels" -}} +helm.sh/chart: {{ include "k8s-optimization.chart" . }} +{{ include "k8s-optimization.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "k8s-optimization.selectorLabels" -}} +app.kubernetes.io/name: {{ include "k8s-optimization.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "k8s-optimization.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "k8s-optimization.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/deployment.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/deployment.yaml new file mode 100644 index 0000000..9949d20 --- /dev/null +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/deployment.yaml @@ -0,0 +1,103 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "k8s-optimization.fullname" . }}-manager + labels: + app.kuberentes.io/instance: controller-manager + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: k8s-optimization + app.kubernetes.io/part-of: k8s-optimization + {{- include "k8s-optimization.labels" . | nindent 4 }} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "k8s-optimization.fullname" . }}-manager + labels: + app.kubernetes.io/component: manager + app.kubernetes.io/created-by: k8s-optimization + app.kubernetes.io/part-of: k8s-optimization + control-plane: controller-manager + {{- include "k8s-optimization.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.controllerManager.replicas }} + selector: + matchLabels: + control-plane: controller-manager + {{- include "k8s-optimization.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + control-plane: controller-manager + {{- include "k8s-optimization.selectorLabels" . | nindent 8 }} + annotations: + kubectl.kubernetes.io/default-container: manager + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - amd64 + - arm64 + - ppc64le + - s390x + - key: kubernetes.io/os + operator: In + values: + - linux + containers: + - args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=0 + 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: + - --health-probe-bind-address=:8081 + - --metrics-bind-address=127.0.0.1:8080 + - --leader-elect + 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 "k8s-optimization.fullname" . }}-manager + terminationGracePeriodSeconds: 10 \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/leader-election-rbac.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/leader-election-rbac.yaml new file mode 100644 index 0000000..fe3db34 --- /dev/null +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/leader-election-rbac.yaml @@ -0,0 +1,59 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "k8s-optimization.fullname" . }}-leader-election-role + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: k8s-optimization + app.kubernetes.io/part-of: k8s-optimization + {{- include "k8s-optimization.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 "k8s-optimization.fullname" . }}-leader-election-rolebinding + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: k8s-optimization + app.kubernetes.io/part-of: k8s-optimization + {{- include "k8s-optimization.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: '{{ include "k8s-optimization.fullname" . }}-leader-election-role' +subjects: +- kind: ServiceAccount + name: '{{ include "k8s-optimization.fullname" . }}-manager' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/manager-rbac.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/manager-rbac.yaml new file mode 100644 index 0000000..70d9a1a --- /dev/null +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/manager-rbac.yaml @@ -0,0 +1,102 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "k8s-optimization.fullname" . }}-manager-role + labels: + {{- include "k8s-optimization.labels" . | nindent 4 }} +rules: +- apiGroups: + - apps + resources: + - deployments + verbs: + - get + - list + - update + - watch +- apiGroups: + - "" + resources: + - pods + verbs: + - get + - list + - watch +- apiGroups: + - k8so.vmware.com + resources: + - optimizationrecommendationsettings + verbs: + - get + - list + - watch +- apiGroups: + - k8so.vmware.com + resources: + - optimizationrecommendations + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - k8so.vmware.com + resources: + - optimizationrecommendations/finalizers + verbs: + - update +- apiGroups: + - k8so.vmware.com + resources: + - optimizationrecommendations/status + verbs: + - get + - patch + - update +- apiGroups: + - k8so.vmware.com + resources: + - optimizationrecommendationsettings + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - k8so.vmware.com + resources: + - optimizationrecommendationsettings/finalizers + verbs: + - update +- apiGroups: + - k8so.vmware.com + resources: + - optimizationrecommendationsettings/status + verbs: + - get + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "k8s-optimization.fullname" . }}-manager-rolebinding + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: k8s-optimization + app.kubernetes.io/part-of: k8s-optimization + {{- include "k8s-optimization.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: '{{ include "k8s-optimization.fullname" . }}-manager-role' +subjects: +- kind: ServiceAccount + name: '{{ include "k8s-optimization.fullname" . }}-manager' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-reader-rbac.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-reader-rbac.yaml new file mode 100644 index 0000000..92840bf --- /dev/null +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-reader-rbac.yaml @@ -0,0 +1,14 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "k8s-optimization.fullname" . }}-metrics-reader + labels: + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: k8s-optimization + app.kubernetes.io/part-of: k8s-optimization + {{- include "k8s-optimization.labels" . | nindent 4 }} +rules: +- nonResourceURLs: + - /metrics + verbs: + - get \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-service.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-service.yaml new file mode 100644 index 0000000..1dd0819 --- /dev/null +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "k8s-optimization.fullname" . }}-manager-metrics-service + labels: + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: k8s-optimization + app.kubernetes.io/part-of: k8s-optimization + control-plane: controller-manager + {{- include "k8s-optimization.labels" . | nindent 4 }} +spec: + type: {{ .Values.metricsService.type }} + selector: + control-plane: controller-manager + {{- include "k8s-optimization.selectorLabels" . | nindent 4 }} + ports: + {{- .Values.metricsService.ports | toYaml | nindent 2 -}} \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/proxy-rbac.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/proxy-rbac.yaml new file mode 100644 index 0000000..94a048f --- /dev/null +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/proxy-rbac.yaml @@ -0,0 +1,40 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "k8s-optimization.fullname" . }}-proxy-role + labels: + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: k8s-optimization + app.kubernetes.io/part-of: k8s-optimization + {{- include "k8s-optimization.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 "k8s-optimization.fullname" . }}-proxy-rolebinding + labels: + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: k8s-optimization + app.kubernetes.io/part-of: k8s-optimization + {{- include "k8s-optimization.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: '{{ include "k8s-optimization.fullname" . }}-proxy-role' +subjects: +- kind: ServiceAccount + name: '{{ include "k8s-optimization.fullname" . }}-manager' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendation-crd.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendation-crd.yaml new file mode 100644 index 0000000..1f02171 --- /dev/null +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendation-crd.yaml @@ -0,0 +1,217 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: optimizationrecommendations.k8so.vmware.com + annotations: + controller-gen.kubebuilder.io/version: v0.11.1 + labels: + {{- include "k8s-optimization.labels" . | nindent 4 }} +spec: + group: k8so.vmware.com + names: + categories: + - recommendations + kind: OptimizationRecommendation + listKind: OptimizationRecommendationList + plural: optimizationrecommendations + singular: recommendation + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.targetRef.name + name: Target + type: string + - jsonPath: .spec.containerRecommendations[0].name + name: Container + type: string + - jsonPath: .spec.containerRecommendations[0].resources.requests['cpu'] + name: Rcmd CPU + type: string + - jsonPath: .spec.containerRecommendations[0].resources.requests['memory'] + name: Rcmd Mem + type: string + - jsonPath: .spec.replicasRecommendation + name: Rcmd Replicas + type: string + - jsonPath: .spec.updateMode + name: Update Mode + type: string + - jsonPath: .spec.manualChangeApproved + name: Man Approved + type: string + - jsonPath: .spec.lastRecommendedTime + name: Recommendation Updated At + type: string + - jsonPath: .status.updateStatus + name: Update Status + type: string + - jsonPath: .status.details.targetResourceLastUpdatedTime + name: Target Updated At + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: OptimizationRecommendation is the Schema for the optimizationrecommendations + 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: OptimizationRecommendationSpec defines the desired state of + OptimizationRecommendation + properties: + containerRecommendations: + description: Recommendations for containers that should be applied to + the target resource + items: + properties: + name: + description: Container Name + type: string + resources: + description: Recommended ResourceRequirements describes the compute + resource requirements recommendation + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + required: + - name + - resources + type: object + type: array + lastRecommendedTime: + description: Most recent date and time that this recommendation was + created or updated + format: date-time + type: string + manualChangeApproved: + description: Indicates whether the recommendation has been manually + approved for application to the target resource + enum: + - false + - true + type: boolean + namespace: + description: Namespace indicating which namespace the target resource + resides in + type: string + replicasRecommendation: + description: Recommendation for replicas that should be applied to the + target resource + format: int32 + type: integer + targetRef: + description: TargetRef indicates the target resource for the recommendation + properties: + apiVersion: + description: API version of the referent + type: string + kind: + description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"' + type: string + name: + description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + updateMode: + description: UpdateMode (Auto, Manual, Default) refers to modes according + to which recommendation can take place. "Auto" indicates that the + recommendation will be made and applied automatically. "Manual" indicates + that recommendation will be made but not applied until it is manually + approved. "Default" indicates that the UpdateMode will be specified + in a separate settings CR. + enum: + - Default + - Auto + - Manual + type: string + required: + - namespace + - targetRef + - updateMode + type: object + status: + description: OptimizationRecommendationStatus describes the state of OptimizationRecommendation + properties: + details: + description: Details about the application of the recommendation to + the target resource + properties: + settingsUsedResourceVersion: + description: String that identifies the server's internal version + of the target resource that can be used to determine when objects + have changed. + type: string + targetResourceLastUpdatedTime: + description: Most recent date and time that the target resource + was updated + format: date-time + type: string + targetResourceVersion: + description: String that identifies the server's internal version + of the target resource that can be used to determine when objects + have changed. + type: string + type: object + updateStatus: + description: The status of the most recent update + enum: + - Pending + - AwaitingManualApproval + - Done + - TargetResourceMissing + - Failed + type: string + updateStatusDescription: + description: A description of the status of the most recent update + type: string + 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/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendationdeploymentsetting-crd.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendationdeploymentsetting-crd.yaml new file mode 100644 index 0000000..4958551 --- /dev/null +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendationdeploymentsetting-crd.yaml @@ -0,0 +1,167 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: optimizationrecommendationsettings.k8so.vmware.com + annotations: + controller-gen.kubebuilder.io/version: v0.11.1 + labels: + {{- include "k8s-optimization.labels" . | nindent 4 }} +spec: + group: k8so.vmware.com + names: + categories: + - recommendationsettings + kind: OptimizationRecommendationSettings + listKind: OptimizationRecommendationSettingsList + plural: optimizationrecommendationsettings + singular: recommendationsetting + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: OptimizationRecommendationSettings is the Schema for + the optimizationrecommendationsettings 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: OptimizationRecommendationSettingsSpec defines the + desired state of OptimizationRecommendationSettings + properties: + constraintViolationPolicy: + description: 'Policy for handling constraint violations Fail: Fail if + the recommended values violate the constraints Conform: Conform the + recommended values to the constraints if they are violated and proceed + with the update' + enum: + - Fail + - Conform + type: string + containerConstraints: + description: Constraints for containers with which recommendations must + comply + properties: + cpuRequestLower: + description: Lower bound for CPU request + type: string + cpuRequestUpper: + description: Upper bound for CPU request + type: string + memRequestLower: + description: Lower bound for Memory request + type: string + memRequestUpper: + description: Upper bound for Memory request + type: string + type: object + defaultUpdateMode: + allOf: + - enum: + - Auto + - Manual + - enum: + - Auto + - Manual + type: string + namespace: + description: Namespace indicating the namespace in which recommendations + reside to which these settings apply + type: string + replicasConstraints: + description: Constraints for replicas with which recommendations must + comply + properties: + maxReplicas: + description: Maximum Replicas allowed by a recommendation Pointer + to distinguish between 0 and not set + format: int32 + type: integer + minReplicas: + description: Minimum Replicas allowed by a recommendation Pointer + to distinguish between 0 and not set + format: int32 + minimum: 1 + type: integer + type: object + selector: + description: LabelSelector indicating the recommendations that the settings + applies to + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains + values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: operator represents a key's relationship to a + set of values. Valid operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator + is In or NotIn, the values array must be non-empty. If the + operator is Exists or DoesNotExist, the values array must + be empty. This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single + {key,value} in the matchLabels map is equivalent to an element + of matchExpressions, whose key field is "key", the operator is + "In", and the values array contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + useTargetRefLabelsForSelectorMatching: + description: UseTargetRefLabelsForSelectorMatching indicates whether + the labels of the target resource should be used to match the selector + enum: + - false + - true + type: boolean + required: + - defaultUpdateMode + - namespace + type: object + status: + description: OptimizationRecommendationSettingsStatus defines + the observed state of OptimizationRecommendationSettings + 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/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml new file mode 100644 index 0000000..48ac53f --- /dev/null +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml @@ -0,0 +1,42 @@ +controllerManager: + kubeRbacProxy: + 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: + containerSecurityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + image: + repository: gregv/k8so-controller + tag: 0.2.0 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 10m + memory: 64Mi + replicas: 1 +kubernetesClusterDomain: cluster.local +metricsService: + ports: + - name: https + port: 8443 + protocol: TCP + targetPort: https + type: ClusterIP diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 640b834..db7a440 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -91,3 +91,6 @@ devArgs: | ['upload_k8s_state_v4', '--verbose'] customEnvVars: [] + +chOptimizer: + enabled: false From 8bce2f22d13ab2a36b5d5e228b0e7e6a53b05af0 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Tue, 10 Oct 2023 15:38:12 -0400 Subject: [PATCH 02/63] Dependent helm chart optinal --- charts/cloudhealth-collector/Chart.yaml | 5 +++++ .../templates/optimizer-agent-cron.yaml | 19 +++++++++++++++++++ charts/cloudhealth-collector/values.yaml | 1 + 3 files changed, 25 insertions(+) create mode 100644 charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 5bcd4cc..68db2eb 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -7,6 +7,11 @@ description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer A type: application version: 5.0.0-beta appVersion: "5.0.0" +dependencies: + - name: cloudhealth-optimization-controller + repository: file://subcharts/cloudhealth-optimization-controller + version: 0.1.1 + condition: chOptimizer.enabled home: https://cloudhealth.vmware.com/ sources: - https://github.com/CloudHealth/helm diff --git a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml new file mode 100644 index 0000000..78d0e2d --- /dev/null +++ b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml @@ -0,0 +1,19 @@ +apiVersion: batch/v1 +kind: CronJob +metadata: + name: hello +spec: + schedule: "* * * * *" + jobTemplate: + spec: + template: + spec: + containers: + - name: hello + image: busybox:1.28 + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - date; echo Hello from the Kubernetes cluster + restartPolicy: OnFailure diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index db7a440..68c8498 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -94,3 +94,4 @@ customEnvVars: [] chOptimizer: enabled: false + name: cloudhealth-optimizer-agent From 19f325bf84304406ad3660421cc7a5818467d10c Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 12 Oct 2023 21:32:13 -0400 Subject: [PATCH 03/63] Configure CronJob --- .github/workflows/release.yml | 1 + charts/cloudhealth-collector/Chart.yaml | 4 +- .../templates/_helpers.tpl | 15 +++++++ .../templates/optimizer-agent-cron.yaml | 39 +++++++++++++++++-- charts/cloudhealth-collector/values.yaml | 5 +++ 5 files changed, 59 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f94589e..4494be0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - gmudumbai/sdo-2649-k8s-optimizer jobs: release: diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 68db2eb..ef27e8e 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,8 +5,8 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.0-beta -appVersion: "5.0.0" +version: 5.0.0-alpha +appVersion: "4.1.0" dependencies: - name: cloudhealth-optimization-controller repository: file://subcharts/cloudhealth-optimization-controller diff --git a/charts/cloudhealth-collector/templates/_helpers.tpl b/charts/cloudhealth-collector/templates/_helpers.tpl index 2aa284c..ac92105 100644 --- a/charts/cloudhealth-collector/templates/_helpers.tpl +++ b/charts/cloudhealth-collector/templates/_helpers.tpl @@ -73,3 +73,18 @@ Create the name of the secrets to use {{- define "cloudhealth-collector.secretName" -}} {{- default .Values.secretName }} {{- end }} + +{{/* +Create the name for CH Optimizer Agent +*/}} +{{- define "cloudhealth-optimizer-agent.name" -}} +{{- default .Values.chOptimizer.name }} +{{- end }} + +{{/* +CH Optimizer Agent Selector labels +*/}} +{{- define "cloudhealth-optimizer-agent.selectorLabels" -}} +app.kubernetes.io/name: {{ include "cloudhealth-optimizer-agent.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} diff --git a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml index 78d0e2d..56233a6 100644 --- a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml +++ b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml @@ -1,19 +1,52 @@ +{{- /* +Copyright 2023 VMware, Inc. +SPDX-License-Identifier: Apache-2.0 +*/}} + +{{- if .Values.chOptimizer.enabled }} apiVersion: batch/v1 kind: CronJob metadata: - name: hello + name: {{ include "cloudhealth-optimizer-agent.name" . }} + labels: + {{- include "cloudhealth-collector.labels" . | nindent 4 }} + {{- with .Values.deployAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: + selector: + matchLabels: + {{- include "cloudhealth-optimizer-agent.selectorLabels" . | nindent 6 }} schedule: "* * * * *" jobTemplate: spec: template: spec: + serviceAccountName: {{ include "cloudhealth-collector.serviceAccountName" . }} containers: - name: hello - image: busybox:1.28 - imagePullPolicy: IfNotPresent + env: + - name: CHT_REGION + value: {{.Values.chtRegion | default "us-east-1" }} + image: "{{ .Values.chOptimizer.image.repository }}:{{ .Values.chOptimizer.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.chOptimizer.image.pullPolicy }} command: - /bin/sh - -c - date; echo Hello from the Kubernetes cluster + + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} restartPolicy: OnFailure +{{- end }} \ No newline at end of file diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 68c8498..bd1d67e 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -25,6 +25,7 @@ jvmMemory: "-Xmx891M" image: repository: cloudhealth/container-collector tag: "1360" + pullPolicy: "IfNotPresent" imagePullSecrets: [] nameOverride: "" @@ -95,3 +96,7 @@ customEnvVars: [] chOptimizer: enabled: false name: cloudhealth-optimizer-agent + image: + repository: cloudhealth/optimizer-agent + tag: "1" + pullPolicy: "IfNotPresent" From acb0230b2400cc42675bc343f667ccff4efe8b76 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 16 Oct 2023 09:27:33 -0400 Subject: [PATCH 04/63] Add CRD permissions --- charts/cloudhealth-collector/templates/clusterrole.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/charts/cloudhealth-collector/templates/clusterrole.yaml b/charts/cloudhealth-collector/templates/clusterrole.yaml index 7880aa5..abff1da 100644 --- a/charts/cloudhealth-collector/templates/clusterrole.yaml +++ b/charts/cloudhealth-collector/templates/clusterrole.yaml @@ -22,3 +22,6 @@ rules: - apiGroups: ["batch"] resources: ["cronjobs", "jobs"] verbs: ["get", "list"] +- apiGroups: ["k8so.vmware.com"] + resources: ["optimizationrecommendations"] + verbs: ["create", "delete", "get", "list", "patch", "update", "watch"] From 1b0cb7c71ea68c91622598971f4b33e759c7e346 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 16 Oct 2023 09:52:04 -0400 Subject: [PATCH 05/63] Change image name --- charts/cloudhealth-collector/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index bd1d67e..f79d0fa 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -97,6 +97,6 @@ chOptimizer: enabled: false name: cloudhealth-optimizer-agent image: - repository: cloudhealth/optimizer-agent + repository: cloudhealth/cloudhealth-optimizer-agent tag: "1" pullPolicy: "IfNotPresent" From 02ef1d3990cf23a528edcfac21cda4c9b3077cd4 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 16 Oct 2023 09:56:00 -0400 Subject: [PATCH 06/63] Update version to get a new chart --- charts/cloudhealth-collector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index ef27e8e..526c86b 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.0-alpha +version: 5.0.1-alpha appVersion: "4.1.0" dependencies: - name: cloudhealth-optimization-controller From 6cb0cff96c714a985ac87dbfa8f1ca4cc769dfa5 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 16 Oct 2023 10:30:17 -0400 Subject: [PATCH 07/63] Add chapi token as secret --- .github/workflows/release.yml | 1 - charts/cloudhealth-collector/Chart.yaml | 2 +- .../templates/optimizer-agent-cron.yaml | 7 +++++++ charts/cloudhealth-collector/templates/secrets.yaml | 3 +++ charts/cloudhealth-collector/values.yaml | 2 ++ 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4494be0..dbc54e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,6 @@ name: Release Charts on: push: branches: - - main - gmudumbai/sdo-2649-k8s-optimizer jobs: diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 526c86b..969fcb7 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.1-alpha +version: 5.0.2-alpha appVersion: "4.1.0" dependencies: - name: cloudhealth-optimization-controller diff --git a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml index 56233a6..0775f1a 100644 --- a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml +++ b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml @@ -27,6 +27,13 @@ spec: containers: - name: hello env: + - name: CHAPI_TOKEN + valueFrom: + secretKeyRef: + name: {{ include "cloudhealth-collector.secretName" . }} + key: chapiToken + - name: CHT_CLUSTER_NAME + value: {{.Values.clusterName | required "A valid clusterName required!" | quote }} - name: CHT_REGION value: {{.Values.chtRegion | default "us-east-1" }} image: "{{ .Values.chOptimizer.image.repository }}:{{ .Values.chOptimizer.image.tag | default .Chart.AppVersion }}" diff --git a/charts/cloudhealth-collector/templates/secrets.yaml b/charts/cloudhealth-collector/templates/secrets.yaml index aa003d8..e7f6329 100644 --- a/charts/cloudhealth-collector/templates/secrets.yaml +++ b/charts/cloudhealth-collector/templates/secrets.yaml @@ -13,4 +13,7 @@ metadata: type: Opaque data: apiToken: {{ .Values.apiToken | b64enc | quote }} + {{- if .Values.chOptimizer.enabled }} + chapiToken: {{ .Values.chapiToken | b64enc | quote }} + {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index f79d0fa..29dcdca 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -100,3 +100,5 @@ chOptimizer: repository: cloudhealth/cloudhealth-optimizer-agent tag: "1" pullPolicy: "IfNotPresent" + # Set to automatically create secret, or create a secret with the name specified by the 'secretName' parameter + chapiToken: "" From fc44d646977cb6ec7eec4e8070aad6810d550334 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 16 Oct 2023 17:32:38 -0400 Subject: [PATCH 08/63] Move to including the built chart as dependency. --- charts/cloudhealth-collector/Chart.yaml | 6 +- .../.helmignore | 23 -- .../Chart.yaml | 21 -- .../templates/_helpers.tpl | 62 ----- .../templates/deployment.yaml | 103 --------- .../templates/leader-election-rbac.yaml | 59 ----- .../templates/manager-rbac.yaml | 102 -------- .../templates/metrics-reader-rbac.yaml | 14 -- .../templates/metrics-service.yaml | 17 -- .../templates/proxy-rbac.yaml | 40 ---- .../templates/recommendation-crd.yaml | 217 ------------------ .../recommendationdeploymentsetting-crd.yaml | 167 -------------- .../values.yaml | 42 ---- .../subcharts/k8s-optimization-0.2.0.tgz | Bin 0 -> 7243 bytes 14 files changed, 3 insertions(+), 870 deletions(-) delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/.helmignore delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/Chart.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/_helpers.tpl delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/deployment.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/leader-election-rbac.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/manager-rbac.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-reader-rbac.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-service.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/proxy-rbac.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendation-crd.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendationdeploymentsetting-crd.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml create mode 100644 charts/cloudhealth-collector/subcharts/k8s-optimization-0.2.0.tgz diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 969fcb7..e06672f 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,12 +5,12 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.2-alpha +version: 5.0.3-alpha appVersion: "4.1.0" dependencies: - name: cloudhealth-optimization-controller - repository: file://subcharts/cloudhealth-optimization-controller - version: 0.1.1 + repository: file://subcharts/k8s-optimization-0.2.0.tgz + version: 0.2.0 condition: chOptimizer.enabled home: https://cloudhealth.vmware.com/ sources: diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/.helmignore b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/Chart.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/Chart.yaml deleted file mode 100644 index e22fd43..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/Chart.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v2 -name: cloudhealth-optimization-controller -description: A Helm chart for CloudHealth Optimization Controller -# 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.1 -# 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.1" diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/_helpers.tpl b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/_helpers.tpl deleted file mode 100644 index 3c5d167..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "k8s-optimization.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 "k8s-optimization.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 "k8s-optimization.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "k8s-optimization.labels" -}} -helm.sh/chart: {{ include "k8s-optimization.chart" . }} -{{ include "k8s-optimization.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "k8s-optimization.selectorLabels" -}} -app.kubernetes.io/name: {{ include "k8s-optimization.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "k8s-optimization.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "k8s-optimization.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/deployment.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/deployment.yaml deleted file mode 100644 index 9949d20..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/deployment.yaml +++ /dev/null @@ -1,103 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "k8s-optimization.fullname" . }}-manager - labels: - app.kuberentes.io/instance: controller-manager - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - {{- include "k8s-optimization.labels" . | nindent 4 }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "k8s-optimization.fullname" . }}-manager - labels: - app.kubernetes.io/component: manager - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - control-plane: controller-manager - {{- include "k8s-optimization.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.controllerManager.replicas }} - selector: - matchLabels: - control-plane: controller-manager - {{- include "k8s-optimization.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - control-plane: controller-manager - {{- include "k8s-optimization.selectorLabels" . | nindent 8 }} - annotations: - kubectl.kubernetes.io/default-container: manager - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - amd64 - - arm64 - - ppc64le - - s390x - - key: kubernetes.io/os - operator: In - values: - - linux - containers: - - args: - - --secure-listen-address=0.0.0.0:8443 - - --upstream=http://127.0.0.1:8080/ - - --logtostderr=true - - --v=0 - 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: - - --health-probe-bind-address=:8081 - - --metrics-bind-address=127.0.0.1:8080 - - --leader-elect - 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 "k8s-optimization.fullname" . }}-manager - terminationGracePeriodSeconds: 10 \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/leader-election-rbac.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/leader-election-rbac.yaml deleted file mode 100644 index fe3db34..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/leader-election-rbac.yaml +++ /dev/null @@ -1,59 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ include "k8s-optimization.fullname" . }}-leader-election-role - labels: - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - {{- include "k8s-optimization.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 "k8s-optimization.fullname" . }}-leader-election-rolebinding - labels: - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - {{- include "k8s-optimization.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: '{{ include "k8s-optimization.fullname" . }}-leader-election-role' -subjects: -- kind: ServiceAccount - name: '{{ include "k8s-optimization.fullname" . }}-manager' - namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/manager-rbac.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/manager-rbac.yaml deleted file mode 100644 index 70d9a1a..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/manager-rbac.yaml +++ /dev/null @@ -1,102 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "k8s-optimization.fullname" . }}-manager-role - labels: - {{- include "k8s-optimization.labels" . | nindent 4 }} -rules: -- apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - update - - watch -- apiGroups: - - "" - resources: - - pods - verbs: - - get - - list - - watch -- apiGroups: - - k8so.vmware.com - resources: - - optimizationrecommendationsettings - verbs: - - get - - list - - watch -- apiGroups: - - k8so.vmware.com - resources: - - optimizationrecommendations - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - k8so.vmware.com - resources: - - optimizationrecommendations/finalizers - verbs: - - update -- apiGroups: - - k8so.vmware.com - resources: - - optimizationrecommendations/status - verbs: - - get - - patch - - update -- apiGroups: - - k8so.vmware.com - resources: - - optimizationrecommendationsettings - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - k8so.vmware.com - resources: - - optimizationrecommendationsettings/finalizers - verbs: - - update -- apiGroups: - - k8so.vmware.com - resources: - - optimizationrecommendationsettings/status - verbs: - - get - - patch - - update ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ include "k8s-optimization.fullname" . }}-manager-rolebinding - labels: - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - {{- include "k8s-optimization.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: '{{ include "k8s-optimization.fullname" . }}-manager-role' -subjects: -- kind: ServiceAccount - name: '{{ include "k8s-optimization.fullname" . }}-manager' - namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-reader-rbac.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-reader-rbac.yaml deleted file mode 100644 index 92840bf..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-reader-rbac.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "k8s-optimization.fullname" . }}-metrics-reader - labels: - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - {{- include "k8s-optimization.labels" . | nindent 4 }} -rules: -- nonResourceURLs: - - /metrics - verbs: - - get \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-service.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-service.yaml deleted file mode 100644 index 1dd0819..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "k8s-optimization.fullname" . }}-manager-metrics-service - labels: - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - control-plane: controller-manager - {{- include "k8s-optimization.labels" . | nindent 4 }} -spec: - type: {{ .Values.metricsService.type }} - selector: - control-plane: controller-manager - {{- include "k8s-optimization.selectorLabels" . | nindent 4 }} - ports: - {{- .Values.metricsService.ports | toYaml | nindent 2 -}} \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/proxy-rbac.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/proxy-rbac.yaml deleted file mode 100644 index 94a048f..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/proxy-rbac.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "k8s-optimization.fullname" . }}-proxy-role - labels: - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - {{- include "k8s-optimization.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 "k8s-optimization.fullname" . }}-proxy-rolebinding - labels: - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - {{- include "k8s-optimization.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: '{{ include "k8s-optimization.fullname" . }}-proxy-role' -subjects: -- kind: ServiceAccount - name: '{{ include "k8s-optimization.fullname" . }}-manager' - namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendation-crd.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendation-crd.yaml deleted file mode 100644 index 1f02171..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendation-crd.yaml +++ /dev/null @@ -1,217 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: optimizationrecommendations.k8so.vmware.com - annotations: - controller-gen.kubebuilder.io/version: v0.11.1 - labels: - {{- include "k8s-optimization.labels" . | nindent 4 }} -spec: - group: k8so.vmware.com - names: - categories: - - recommendations - kind: OptimizationRecommendation - listKind: OptimizationRecommendationList - plural: optimizationrecommendations - singular: recommendation - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.targetRef.name - name: Target - type: string - - jsonPath: .spec.containerRecommendations[0].name - name: Container - type: string - - jsonPath: .spec.containerRecommendations[0].resources.requests['cpu'] - name: Rcmd CPU - type: string - - jsonPath: .spec.containerRecommendations[0].resources.requests['memory'] - name: Rcmd Mem - type: string - - jsonPath: .spec.replicasRecommendation - name: Rcmd Replicas - type: string - - jsonPath: .spec.updateMode - name: Update Mode - type: string - - jsonPath: .spec.manualChangeApproved - name: Man Approved - type: string - - jsonPath: .spec.lastRecommendedTime - name: Recommendation Updated At - type: string - - jsonPath: .status.updateStatus - name: Update Status - type: string - - jsonPath: .status.details.targetResourceLastUpdatedTime - name: Target Updated At - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: OptimizationRecommendation is the Schema for the optimizationrecommendations - 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: OptimizationRecommendationSpec defines the desired state of - OptimizationRecommendation - properties: - containerRecommendations: - description: Recommendations for containers that should be applied to - the target resource - items: - properties: - name: - description: Container Name - type: string - resources: - description: Recommended ResourceRequirements describes the compute - resource requirements recommendation - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - required: - - name - - resources - type: object - type: array - lastRecommendedTime: - description: Most recent date and time that this recommendation was - created or updated - format: date-time - type: string - manualChangeApproved: - description: Indicates whether the recommendation has been manually - approved for application to the target resource - enum: - - false - - true - type: boolean - namespace: - description: Namespace indicating which namespace the target resource - resides in - type: string - replicasRecommendation: - description: Recommendation for replicas that should be applied to the - target resource - format: int32 - type: integer - targetRef: - description: TargetRef indicates the target resource for the recommendation - properties: - apiVersion: - description: API version of the referent - type: string - kind: - description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"' - type: string - name: - description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - updateMode: - description: UpdateMode (Auto, Manual, Default) refers to modes according - to which recommendation can take place. "Auto" indicates that the - recommendation will be made and applied automatically. "Manual" indicates - that recommendation will be made but not applied until it is manually - approved. "Default" indicates that the UpdateMode will be specified - in a separate settings CR. - enum: - - Default - - Auto - - Manual - type: string - required: - - namespace - - targetRef - - updateMode - type: object - status: - description: OptimizationRecommendationStatus describes the state of OptimizationRecommendation - properties: - details: - description: Details about the application of the recommendation to - the target resource - properties: - settingsUsedResourceVersion: - description: String that identifies the server's internal version - of the target resource that can be used to determine when objects - have changed. - type: string - targetResourceLastUpdatedTime: - description: Most recent date and time that the target resource - was updated - format: date-time - type: string - targetResourceVersion: - description: String that identifies the server's internal version - of the target resource that can be used to determine when objects - have changed. - type: string - type: object - updateStatus: - description: The status of the most recent update - enum: - - Pending - - AwaitingManualApproval - - Done - - TargetResourceMissing - - Failed - type: string - updateStatusDescription: - description: A description of the status of the most recent update - type: string - 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/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendationdeploymentsetting-crd.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendationdeploymentsetting-crd.yaml deleted file mode 100644 index 4958551..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendationdeploymentsetting-crd.yaml +++ /dev/null @@ -1,167 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: optimizationrecommendationsettings.k8so.vmware.com - annotations: - controller-gen.kubebuilder.io/version: v0.11.1 - labels: - {{- include "k8s-optimization.labels" . | nindent 4 }} -spec: - group: k8so.vmware.com - names: - categories: - - recommendationsettings - kind: OptimizationRecommendationSettings - listKind: OptimizationRecommendationSettingsList - plural: optimizationrecommendationsettings - singular: recommendationsetting - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: OptimizationRecommendationSettings is the Schema for - the optimizationrecommendationsettings 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: OptimizationRecommendationSettingsSpec defines the - desired state of OptimizationRecommendationSettings - properties: - constraintViolationPolicy: - description: 'Policy for handling constraint violations Fail: Fail if - the recommended values violate the constraints Conform: Conform the - recommended values to the constraints if they are violated and proceed - with the update' - enum: - - Fail - - Conform - type: string - containerConstraints: - description: Constraints for containers with which recommendations must - comply - properties: - cpuRequestLower: - description: Lower bound for CPU request - type: string - cpuRequestUpper: - description: Upper bound for CPU request - type: string - memRequestLower: - description: Lower bound for Memory request - type: string - memRequestUpper: - description: Upper bound for Memory request - type: string - type: object - defaultUpdateMode: - allOf: - - enum: - - Auto - - Manual - - enum: - - Auto - - Manual - type: string - namespace: - description: Namespace indicating the namespace in which recommendations - reside to which these settings apply - type: string - replicasConstraints: - description: Constraints for replicas with which recommendations must - comply - properties: - maxReplicas: - description: Maximum Replicas allowed by a recommendation Pointer - to distinguish between 0 and not set - format: int32 - type: integer - minReplicas: - description: Minimum Replicas allowed by a recommendation Pointer - to distinguish between 0 and not set - format: int32 - minimum: 1 - type: integer - type: object - selector: - description: LabelSelector indicating the recommendations that the settings - applies to - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains - values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to a - set of values. Valid operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator - is In or NotIn, the values array must be non-empty. If the - operator is Exists or DoesNotExist, the values array must - be empty. This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single - {key,value} in the matchLabels map is equivalent to an element - of matchExpressions, whose key field is "key", the operator is - "In", and the values array contains only "value". The requirements - are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - useTargetRefLabelsForSelectorMatching: - description: UseTargetRefLabelsForSelectorMatching indicates whether - the labels of the target resource should be used to match the selector - enum: - - false - - true - type: boolean - required: - - defaultUpdateMode - - namespace - type: object - status: - description: OptimizationRecommendationSettingsStatus defines - the observed state of OptimizationRecommendationSettings - 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/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml deleted file mode 100644 index 48ac53f..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml +++ /dev/null @@ -1,42 +0,0 @@ -controllerManager: - kubeRbacProxy: - 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: - containerSecurityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - image: - repository: gregv/k8so-controller - tag: 0.2.0 - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 10m - memory: 64Mi - replicas: 1 -kubernetesClusterDomain: cluster.local -metricsService: - ports: - - name: https - port: 8443 - protocol: TCP - targetPort: https - type: ClusterIP diff --git a/charts/cloudhealth-collector/subcharts/k8s-optimization-0.2.0.tgz b/charts/cloudhealth-collector/subcharts/k8s-optimization-0.2.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..8748d0b6e1c1169ff392b71132f423947b9093fb GIT binary patch literal 7243 zcmV-R9JJ#fiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PKBha~n6ZXue+l3S4EkY$u)(saL$bmDw?En4-PzyW-TP`h+1s0Z_Z1r783r9K z6%zBW#RNq)5atVEK6%LV1OzDuFCsz$ z^>7$+5aRo>um79A*xTF9x~7Sc9B};oQp#kyy*=6aPIsG3UyNUjx3hi`TSz8k2%LW} zc?#Ksi|@z!v%(Y;3j9nBPUQ6wqY|#9!3rT9MeOo~lM52T0$z#$N7zWMIgSL_UI9+< zj6_5d5bjNcLe7%>FAp8Qey#r^F7v zri_oGR7l{*EXIURQDFY`BNpIjWS8;GKvbX-#tmj3GFn{iRiVdFkESTw(Ftdg1uUAP zcSk29LoU7md7`_y*No1$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IO z1}6^mCkMDTNKTrz60ZzN8gQ-Olr^m@i6HMYD1T&N2|hG<9=%BhuB~3NZw1P)nS9VQ zyh}}3ISHX}TE!HFp~(n6Fq=~qh9o8Q0Pap%7;2Ub;<`bdR!LeY18!sGHS5t?Z<-c% zgf4Qf{)tA7H)?c{f7+5vQ1QBV!A67%$3Ua1D0{(rl3rfnIEi4YR8=iI z*ZEcL{GQ@rYS;ntre1nSgzy?N*$W( zM`#}5h1!{#4W8$3H2Y3VFtVCQI1ICbb)6`;(YAt%%!U$El$Bdzy6@V-Dtt#A8-{YkQh<}19_uK7~cX`}fzQf8z1Hk$7b%99(-_aCPD zHdQK2GjY8OIN^kGBKuq`rb%@flCE0Kn=7C7@9*Wx=Y3u6EM4ZT z%xZJBbJP9^N?9FM=-*{|IH9Pf>HH}^m9qZRLeW>-DW z%*r2{m2bG<`RP-~^~!k~MXK8t^3lzWSGdM$4l}%TRZ}Mp=*yiPs67xV!x_^6rl|4d z!YkPsN?Cl20+mz5XE!onO6o+cdT$Zh?vL4V}We&^fzU-!jwv911be~JsbodcTT;5<#xoJ1f--}vG(8GYl= z@cHN)U&iV)<76@V=6^86>Hm#%mZvX%Q|NogSQCtAn005oVSi=AS literal 0 HcmV?d00001 From 411d2c87de1e1dfbf0c962027d6c5983d6a3a650 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 16 Oct 2023 21:40:21 -0400 Subject: [PATCH 09/63] add cron schedule --- charts/cloudhealth-collector/Chart.yaml | 2 +- .../cloudhealth-collector/templates/optimizer-agent-cron.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index e06672f..68d12aa 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.3-alpha +version: 5.0.4-alpha appVersion: "4.1.0" dependencies: - name: cloudhealth-optimization-controller diff --git a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml index 0775f1a..88c4311 100644 --- a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml +++ b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml @@ -18,7 +18,7 @@ spec: selector: matchLabels: {{- include "cloudhealth-optimizer-agent.selectorLabels" . | nindent 6 }} - schedule: "* * * * *" + schedule: "0 12 * * *" jobTemplate: spec: template: From db51661b0b3b8ad2d7e8fe2b1fae101647707d7b Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 16 Oct 2023 22:23:12 -0400 Subject: [PATCH 10/63] Update tgz file dependency path --- charts/cloudhealth-collector/Chart.yaml | 3 +-- .../charts/k8s-optimization-0.2.0.tgz | Bin 0 -> 7242 bytes .../subcharts/k8s-optimization-0.2.0.tgz | Bin 7243 -> 0 bytes charts/cloudhealth-collector/values.yaml | 2 +- 4 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 charts/cloudhealth-collector/charts/k8s-optimization-0.2.0.tgz delete mode 100644 charts/cloudhealth-collector/subcharts/k8s-optimization-0.2.0.tgz diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 68d12aa..5f95ecc 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -8,8 +8,7 @@ type: application version: 5.0.4-alpha appVersion: "4.1.0" dependencies: - - name: cloudhealth-optimization-controller - repository: file://subcharts/k8s-optimization-0.2.0.tgz + - name: k8s-optimization-0.2.0.tgz version: 0.2.0 condition: chOptimizer.enabled home: https://cloudhealth.vmware.com/ diff --git a/charts/cloudhealth-collector/charts/k8s-optimization-0.2.0.tgz b/charts/cloudhealth-collector/charts/k8s-optimization-0.2.0.tgz new file mode 100644 index 0000000000000000000000000000000000000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Sn0kotOJb(p9T@d*!qK{k>fIysxXBrOTX^ zS#7U&Zrgug>$v}^c#;HwgFqSZ>t6aSwC?+#gyLk?OXCd~|c;6|Qlb!wfH7)zpat`f?`+Y7a!paKe{E*&i_)_A1t66X)>!}A{`Z#<#biMlhr8mjzWx7fzq0=)2Z!7H-}lqLMyJL# zrClRt-OW#;=)2ZB2?hrjcmcv6eQgRCi8M(Vmja0;L=jpSvKGMlNjDqu)p#(UJ2nB!SpPc`4t}K($*XWqVF{9}H z@i__!7bAZ`(`M&I}| zd@=gQm$CZHI9ZIo`Jd6(=so6yr2@S?c_BuA!kISUd=diQHQhP;b>y!^z(Uv^ed)#B Ywr$(CZR=?N8vp?R|AwapWB}Lz0F~2SYybcN literal 0 HcmV?d00001 diff --git a/charts/cloudhealth-collector/subcharts/k8s-optimization-0.2.0.tgz b/charts/cloudhealth-collector/subcharts/k8s-optimization-0.2.0.tgz deleted file mode 100644 index 8748d0b6e1c1169ff392b71132f423947b9093fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7243 zcmV-R9JJ#fiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PKBha~n6ZXue+l3S4EkY$u)(saL$bmDw?En4-PzyW-TP`h+1s0Z_Z1r783r9K z6%zBW#RNq)5atVEK6%LV1OzDuFCsz$ z^>7$+5aRo>um79A*xTF9x~7Sc9B};oQp#kyy*=6aPIsG3UyNUjx3hi`TSz8k2%LW} zc?#Ksi|@z!v%(Y;3j9nBPUQ6wqY|#9!3rT9MeOo~lM52T0$z#$N7zWMIgSL_UI9+< zj6_5d5bjNcLe7%>FAp8Qey#r^F7v zri_oGR7l{*EXIURQDFY`BNpIjWS8;GKvbX-#tmj3GFn{iRiVdFkESTw(Ftdg1uUAP zcSk29LoU7md7`_y*No1$NW41PsQAa*YWiP7oJ3fH*#2b+Q371}GP#{8(4+r%_jkq> z{r}x~XS~t>_t8Fm+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P)nS9VQ zyh}}3ISHX}TE!HFp~(n6Fq=~qh9o8Q0Pap%7;2Ub;<`bdR!LeY18!sGHS5t?Z<-c% zgf4Qf{)tA7H)?c{f7+5vQ1QBV!A67%$3Ua1D0{(rl3rfnIEi4YR8=iI z*ZEcL{GQ@rYS;ntre1nSgzy?N*$W( zM`#}5h1!{#4W8$3H2Y3VFtVCQI1ICbb)6`;(YAt%%!U$El$Bdzy6@V-Dtt#A8-{YkQh<}19_uK7~cX`}fzQf8z1Hk$7b%99(-_aCPD zHdQK2GjY8OIN^kGBKuq`rb%@flCE0Kn=7C7@9*Wx=Y3u6EM4ZT z%xZJBbJP9^N?9FM=-*{|IH9Pf>HH}^m9qZRLeW>-DW z%*r2{m2bG<`RP-~^~!k~MXK8t^3lzWSGdM$4l}%TRZ}Mp=*yiPs67xV!x_^6rl|4d z!YkPsN?Cl20+mz5XE!onO6o+cdT$Zh?vL4V}We&^fzU-!jwv911be~JsbodcTT;5<#xoJ1f--}vG(8GYl= z@cHN)U&iV)<76@V=6^86>Hm#%mZvX%Q|NogSQCtAn005oVSi=AS diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 29dcdca..5c873b0 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -98,7 +98,7 @@ chOptimizer: name: cloudhealth-optimizer-agent image: repository: cloudhealth/cloudhealth-optimizer-agent - tag: "1" + tag: "latest" pullPolicy: "IfNotPresent" # Set to automatically create secret, or create a secret with the name specified by the 'secretName' parameter chapiToken: "" From f0c4bb9cb9877abeb2e40359a4b9df4325338b49 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 16 Oct 2023 22:42:15 -0400 Subject: [PATCH 11/63] Fix helm --- charts/cloudhealth-collector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 5f95ecc..f764ce6 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -8,7 +8,7 @@ type: application version: 5.0.4-alpha appVersion: "4.1.0" dependencies: - - name: k8s-optimization-0.2.0.tgz + - name: k8s-optimization version: 0.2.0 condition: chOptimizer.enabled home: https://cloudhealth.vmware.com/ From 423821fbe1a3134d23d494b572c43de908e9d1db Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 16 Oct 2023 22:42:39 -0400 Subject: [PATCH 12/63] Update Chart version --- charts/cloudhealth-collector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index f764ce6..ddcc61d 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.4-alpha +version: 5.0.5-alpha appVersion: "4.1.0" dependencies: - name: k8s-optimization From efa7ceb11f5f3a3b61c4651beaa3b9b516d26c06 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 16 Oct 2023 22:47:09 -0400 Subject: [PATCH 13/63] revert change to release.yml --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dbc54e5..4494be0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,7 @@ name: Release Charts on: push: branches: + - main - gmudumbai/sdo-2649-k8s-optimizer jobs: From 60193dcb92cf92e5ecc27af4be78aacbaab4cb10 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Tue, 17 Oct 2023 09:56:06 -0400 Subject: [PATCH 14/63] Some fixes --- charts/cloudhealth-collector/templates/clusterrole.yaml | 2 ++ .../cloudhealth-collector/templates/optimizer-agent-cron.yaml | 3 --- charts/cloudhealth-collector/templates/secrets.yaml | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/charts/cloudhealth-collector/templates/clusterrole.yaml b/charts/cloudhealth-collector/templates/clusterrole.yaml index abff1da..b4dc25d 100644 --- a/charts/cloudhealth-collector/templates/clusterrole.yaml +++ b/charts/cloudhealth-collector/templates/clusterrole.yaml @@ -22,6 +22,8 @@ rules: - apiGroups: ["batch"] resources: ["cronjobs", "jobs"] verbs: ["get", "list"] +{{- if .Values.chOptimizer.enabled }} - apiGroups: ["k8so.vmware.com"] resources: ["optimizationrecommendations"] verbs: ["create", "delete", "get", "list", "patch", "update", "watch"] +{{- end }} diff --git a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml index 88c4311..2ee940d 100644 --- a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml +++ b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml @@ -15,9 +15,6 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - selector: - matchLabels: - {{- include "cloudhealth-optimizer-agent.selectorLabels" . | nindent 6 }} schedule: "0 12 * * *" jobTemplate: spec: diff --git a/charts/cloudhealth-collector/templates/secrets.yaml b/charts/cloudhealth-collector/templates/secrets.yaml index e7f6329..6ba94bf 100644 --- a/charts/cloudhealth-collector/templates/secrets.yaml +++ b/charts/cloudhealth-collector/templates/secrets.yaml @@ -14,6 +14,6 @@ type: Opaque data: apiToken: {{ .Values.apiToken | b64enc | quote }} {{- if .Values.chOptimizer.enabled }} - chapiToken: {{ .Values.chapiToken | b64enc | quote }} + chapiToken: {{ .Values.chOptimizer.chapiToken | b64enc | quote }} {{- end }} {{- end }} \ No newline at end of file From 197d4333c82f9da316c776f43720897763d5eb08 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Tue, 17 Oct 2023 22:20:10 -0400 Subject: [PATCH 15/63] package controller helm --- .../charts/k8s-optimization-0.2.0.tgz | Bin 7242 -> 6700 bytes .../templates/clusterrole.yaml | 5 ----- 2 files changed, 5 deletions(-) diff --git a/charts/cloudhealth-collector/charts/k8s-optimization-0.2.0.tgz b/charts/cloudhealth-collector/charts/k8s-optimization-0.2.0.tgz index f8c6dcbd1cecab788981051835304240b4428579..545a9f9e2d51f5daa73a1781b9b84556972990e6 100644 GIT binary patch delta 6699 zcmV+`8r0>=IIJ{~Jb!z08#j`8{{8V&;3w~vA2EldB+Fi2rM9$^Hm8cMs3hB0S6*KV zoN1DXW`GHRp`_Tp&whp1ykDYZS=kV&a;O=g(cNftHyRDh#Vavnu_O`s9ZSOK=wOMt z^saFfes@=8JRXntc6asv$K!GN|KsiP_IH!r7n7a6otL}2FMqxpPj+{A#^0gwong>Y z5+O1FZhY&$%EbLa3XaKp;DRtZMXT)rj^p&tvA6Aw2LTA5lUV9U`{+L*jF7Kn1kD*o zKP5BZ6eNfN#Su(VS)K;+I)*92aU2rgJXsYx_|_cwbC=5eU*RwTaiI0S6&|7<>A^>8st{owRBa3&{aTKP;t;r=!ti`=zcnnZ6po8jsR?AzMf$WB{E1 zAbA4mi`5Tf{aay*2?c(xIw$h_fKdro(qM%U4nuZ%%74jJ=UAz)(m`#BEh#AxL^~Y;c)65PS2W>LN6sZvqz*oeFecxvZwM@g5GO3v)rs&g` z!9{9}55h!9;D;>2gieuf{`5lT<8WYy@!UXEpnqb<4Q4}Rthk!1LieFwO;I|dW6mV= zSvW;+4^9V$U3>xZR9AD&jLo-59G`AX{KG93`!6AiLo7jzepx~o0~el*Z|4eh*#Dgu z+vAe`e>vWnZ0!Giluw^V&jv?VF{S~MOVINlvAO=O-F$EGZ1m;J;M1oe3SdqspsljZ zcz>$V78+*Na1u)7nWf~3g6O?BZl$XE^9nd80ie%F@`U z&_MkhXfzKvUYqgHiGjAjyzi5`mt~t~E;zPk+u;T|yT~#Na>m2FG*6Ap|Te@2s5@c9Eo? z5s5BI7@`@VL?}E3!WwytZ8wKi9oI`)&DF=Uv5~{oUw~pH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PCgbY2(h_`)3s&i-w z^qRJgKB6ZtwH$>lMi}^ zcc}?$Cn5ArtC*rNG#Q}>W^<~-kfekjz}+beL(P&wTsNrGI!OyNw* zH=1%cL96$~rS(c?3*;dRmqifT8d3~mEeN-F%EzfDUGJ(0WiMDy(u*q`ClO4Qs;Xrt zyK63?e$r>nuOWD$5(!SpH0vz#m2(@BwySe+}?0PkvdRyu+&B zpQq;cXRP@BK)ZZdf0AsV`3i5fYra%<+G@V7l-X*&t>*iK^5jVRzWqGc{g?Km`GmSnL6ArVbu;3TMzs=2NP zt-Gdx)gV(e8P}h+*Ba;&liT7L51~-RpSn0kotOJb(p9T@d*!qK{k>fIysxXBrOTX^ zS#7U&Zrgug>$v}^c#;HwgFqSZ>t6aSwC?+#gyLk?OXCd~|c;6|Qlb!wfH7)zpat`f?`+Y7a!paKe{E*&i_)_A1t66X)>!}A{`Z#<#biMlhr8mjzWx7fzq0=)2Z!7H-}lqLMyJL# zrClRt-OW#;=)2ZB2?hrjcmcv6eQgRCi8M(Vmja0;L=jpSvKGMlNjDqu)p#(UJ2nB!SpPc`4t}K($*XWqVF{9}H z@i__!7bAZ`(`M&I}| zd@=gQm$CZHI9ZIo`Jd6(=so6yr2@S?c_BuA!kISUd=diQHQhP;b>y!^z(Uv^ed)#B Ywr$(CZR=?N8vp?R|AwapWB}Lz0F~2SYybcN diff --git a/charts/cloudhealth-collector/templates/clusterrole.yaml b/charts/cloudhealth-collector/templates/clusterrole.yaml index b4dc25d..7880aa5 100644 --- a/charts/cloudhealth-collector/templates/clusterrole.yaml +++ b/charts/cloudhealth-collector/templates/clusterrole.yaml @@ -22,8 +22,3 @@ rules: - apiGroups: ["batch"] resources: ["cronjobs", "jobs"] verbs: ["get", "list"] -{{- if .Values.chOptimizer.enabled }} -- apiGroups: ["k8so.vmware.com"] - resources: ["optimizationrecommendations"] - verbs: ["create", "delete", "get", "list", "patch", "update", "watch"] -{{- end }} From f50700e08f10d5c2f5dfc7e2c8976e66d9d16d34 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Wed, 18 Oct 2023 09:31:23 -0400 Subject: [PATCH 16/63] Add helm chart instead of tgz file --- charts/cloudhealth-collector/Chart.yaml | 3 +- .../charts/k8s-optimization-0.2.0.tgz | Bin 6700 -> 0 bytes .../.helmignore | 23 ++ .../Chart.yaml | 21 ++ .../templates/_helpers.tpl | 62 ++++ .../templates/deployment.yaml | 85 ++++++ .../templates/leader-election-rbac.yaml | 59 ++++ .../templates/manager-rbac.yaml | 98 +++++++ .../templates/metrics-reader-rbac.yaml | 14 + .../templates/metrics-service.yaml | 17 ++ .../templates/proxy-rbac.yaml | 40 +++ .../templates/recommendation-crd.yaml | 214 ++++++++++++++ .../templates/recommendationsetting-crd.yaml | 267 ++++++++++++++++++ .../templates/serviceaccount.yaml | 12 + .../values.yaml | 53 ++++ 15 files changed, 967 insertions(+), 1 deletion(-) delete mode 100644 charts/cloudhealth-collector/charts/k8s-optimization-0.2.0.tgz create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/.helmignore create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/Chart.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/_helpers.tpl create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/deployment.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/leader-election-rbac.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/manager-rbac.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-reader-rbac.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-service.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/proxy-rbac.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendation-crd.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendationsetting-crd.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/serviceaccount.yaml create mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index ddcc61d..b9debac 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -8,7 +8,8 @@ type: application version: 5.0.5-alpha appVersion: "4.1.0" dependencies: - - name: k8s-optimization + - name: cloudhealth-optimization-controller + repository: file://subcharts/cloudhealth-optimization-controller version: 0.2.0 condition: chOptimizer.enabled home: https://cloudhealth.vmware.com/ diff --git a/charts/cloudhealth-collector/charts/k8s-optimization-0.2.0.tgz b/charts/cloudhealth-collector/charts/k8s-optimization-0.2.0.tgz deleted file mode 100644 index 545a9f9e2d51f5daa73a1781b9b84556972990e6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6700 zcmV+{8q?(;iwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PKBxa~n63c>ewIQ{X4>mLD;Pq$JB;UZu9Qk~XJ`t*9j1S65zN z3Y=+@h-QEZfT5(=zR!Mz*Sue%WLen|sdA_ppwZoEbT=9e%*87)WU(X>`5jBb=;&aH zx%94a6n=MCWjr2__jY&n|HtET`TyhX@%DF<-4~Ocy`7i4yDz>QPj+{A#^0gwong>Y z5+O1FZhY&$%EbLa3XaKp;DRtZMXT)rj^p&tvA6Aw2LTA5lUV9U`{+L*jF7Kn1kD*o zKP5BZ6eNfN#Su(VS)K;+I)*92aU2rgJXsYx_|_cwbC=5eU*RwTaiRLTO2=j$7zlLZy6yPTuh9MCW z=nw}12O)kKd-}iWtKHq5v}zIy$pJ?{ETxR6qtRshrLH!az8b$8kJ5S}TSz8k0G$6I zc>?K+)emF+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3*`yaE=1P#lTw-Inw_c^atMTcRtep zx(Ca}Nd4pf6e~K)0L`#}k;G_DLJ)&zp16z$&%7DF7(DZ2q<%9_7K3O1J9vcNV@_Bi z(DC7s7 Date: Wed, 18 Oct 2023 15:17:15 -0400 Subject: [PATCH 17/63] Fix image repo and name of controller --- charts/cloudhealth-collector/Chart.yaml | 2 +- .../subcharts/cloudhealth-optimization-controller/values.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index b9debac..6ed08e3 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.5-alpha +version: 5.0.6-alpha appVersion: "4.1.0" dependencies: - name: cloudhealth-optimization-controller diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml index 0c4bda0..9c9c5d6 100644 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml @@ -1,3 +1,4 @@ +fullnameOverride: cloudhealth-optimization controllerManager: kubeRbacProxy: args: @@ -31,7 +32,7 @@ controllerManager: drop: - ALL image: - repository: cloudhealth/cloudhealth-optimizer-agent + repository: cloudhealth/cloudhealth-optimization-controller-dev tag: 0.2.0 resources: limits: From 8eb061a55415fa7e21a82809c38a5d496b48b19a Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Wed, 18 Oct 2023 15:38:50 -0400 Subject: [PATCH 18/63] Update gitignore and github actions --- .github/workflows/release.yml | 1 - .gitignore | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4494be0..f94589e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - gmudumbai/sdo-2649-k8s-optimizer jobs: release: diff --git a/.gitignore b/.gitignore index 4eff553..a702d43 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ .DS_Store _build +*.tgz +.vscode/ +Chart.lock From 7c60635ad230de3ae2d4ed301e2b9a210058c371 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Wed, 18 Oct 2023 15:52:29 -0400 Subject: [PATCH 19/63] Add new commands to Notes --- charts/cloudhealth-collector/NOTES.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/charts/cloudhealth-collector/NOTES.txt b/charts/cloudhealth-collector/NOTES.txt index dfa0ea9..43b8b70 100644 --- a/charts/cloudhealth-collector/NOTES.txt +++ b/charts/cloudhealth-collector/NOTES.txt @@ -31,3 +31,8 @@ upload_k8s_state_v2 --verbose --endpoint http://:9292 helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,image.repository=latest-libs-06-13-3,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]",podSecurityContext.fsGroup=2000,containerSecurityContext.readOnlyRootFilesystem=true,containerSecurityContext.runAsNonRoot=true,containerSecurityContext.runAsUser=1000,containerSecurityContext.capabilities.drop={ALL} ./cloudhealth-collector-1.1.3.tgz helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,image.repository=latest-libs-06-13-3,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" --set "customEnvVars[0].name=ENV4" --set "customEnvVars[0].value=VALUE4" --set serviceAccount.name=sample_service_account ./cloudhealth-collector-1.1.2.tgz + +NEW ALPHA IMAGE INSTRUCTIONS: +helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set chOptimizer.enabled=true,chOptimizer.chapiToken=xyzabc,clusterName=test-cluster,apiToken=tttyyy cloudhealth/cloudhealth-collector --version 5.0.6-alpha + +helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set clusterName=test-cluster,apiToken=tttyyy cloudhealth/cloudhealth-collector --version 5.0.6-alpha From b593ab1d57913c4609e4a1745dbad7e59060e4ba Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Wed, 18 Oct 2023 16:04:24 -0400 Subject: [PATCH 20/63] Re-add github action for this branch --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f94589e..4494be0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - gmudumbai/sdo-2649-k8s-optimizer jobs: release: From 31a55febc0fa245619a3b8d03acfff07b49b5dc8 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Wed, 18 Oct 2023 16:05:38 -0400 Subject: [PATCH 21/63] Update version to get PR build passing --- charts/cloudhealth-collector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 6ed08e3..d195fdf 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.6-alpha +version: 5.0.7-alpha appVersion: "4.1.0" dependencies: - name: cloudhealth-optimization-controller From 7ddb78e033cbbd5608521add8dbf3815ddcb9e6b Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Wed, 18 Oct 2023 16:42:18 -0400 Subject: [PATCH 22/63] Fix version number of controller image --- charts/cloudhealth-collector/Chart.yaml | 2 +- .../subcharts/cloudhealth-optimization-controller/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index d195fdf..70d137b 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.7-alpha +version: 5.0.8-alpha appVersion: "4.1.0" dependencies: - name: cloudhealth-optimization-controller diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml index 9c9c5d6..d53e78b 100644 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml @@ -33,7 +33,7 @@ controllerManager: - ALL image: repository: cloudhealth/cloudhealth-optimization-controller-dev - tag: 0.2.0 + tag: 1.0.0 resources: limits: cpu: 500m From d2dd2c9cd6c6d3dd4b36dc022736672ba18726c5 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 19 Oct 2023 11:52:35 -0400 Subject: [PATCH 23/63] Fix Cron Job --- charts/cloudhealth-collector/Chart.yaml | 4 ++-- charts/cloudhealth-collector/NOTES.txt | 2 +- charts/cloudhealth-collector/templates/_helpers.tpl | 2 +- .../templates/optimizer-agent-cron.yaml | 10 +++------- charts/cloudhealth-collector/templates/secrets.yaml | 4 ++-- charts/cloudhealth-collector/values.yaml | 2 +- 6 files changed, 10 insertions(+), 14 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 70d137b..96cf06d 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,13 +5,13 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.8-alpha +version: 5.0.9-alpha appVersion: "4.1.0" dependencies: - name: cloudhealth-optimization-controller repository: file://subcharts/cloudhealth-optimization-controller version: 0.2.0 - condition: chOptimizer.enabled + condition: cloudhealth-optimizer.enabled home: https://cloudhealth.vmware.com/ sources: - https://github.com/CloudHealth/helm diff --git a/charts/cloudhealth-collector/NOTES.txt b/charts/cloudhealth-collector/NOTES.txt index 43b8b70..fd00a5b 100644 --- a/charts/cloudhealth-collector/NOTES.txt +++ b/charts/cloudhealth-collector/NOTES.txt @@ -33,6 +33,6 @@ helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOK helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,image.repository=latest-libs-06-13-3,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" --set "customEnvVars[0].name=ENV4" --set "customEnvVars[0].value=VALUE4" --set serviceAccount.name=sample_service_account ./cloudhealth-collector-1.1.2.tgz NEW ALPHA IMAGE INSTRUCTIONS: -helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set chOptimizer.enabled=true,chOptimizer.chapiToken=xyzabc,clusterName=test-cluster,apiToken=tttyyy cloudhealth/cloudhealth-collector --version 5.0.6-alpha +helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set cloudhealth-optimizer.enabled=true,cloudhealth-optimizer.chapiToken=xyzabc,clusterName=test-cluster,apiToken=tttyyy cloudhealth/cloudhealth-collector --version 5.0.6-alpha helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set clusterName=test-cluster,apiToken=tttyyy cloudhealth/cloudhealth-collector --version 5.0.6-alpha diff --git a/charts/cloudhealth-collector/templates/_helpers.tpl b/charts/cloudhealth-collector/templates/_helpers.tpl index ac92105..673a111 100644 --- a/charts/cloudhealth-collector/templates/_helpers.tpl +++ b/charts/cloudhealth-collector/templates/_helpers.tpl @@ -78,7 +78,7 @@ Create the name of the secrets to use Create the name for CH Optimizer Agent */}} {{- define "cloudhealth-optimizer-agent.name" -}} -{{- default .Values.chOptimizer.name }} +{{- default .Values.cloudhealth-optimizer.name }} {{- end }} {{/* diff --git a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml index 2ee940d..967bf0b 100644 --- a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml +++ b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml @@ -3,7 +3,7 @@ Copyright 2023 VMware, Inc. SPDX-License-Identifier: Apache-2.0 */}} -{{- if .Values.chOptimizer.enabled }} +{{- if .Values.cloudhealth-optimizer.enabled }} apiVersion: batch/v1 kind: CronJob metadata: @@ -33,12 +33,8 @@ spec: value: {{.Values.clusterName | required "A valid clusterName required!" | quote }} - name: CHT_REGION value: {{.Values.chtRegion | default "us-east-1" }} - image: "{{ .Values.chOptimizer.image.repository }}:{{ .Values.chOptimizer.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.chOptimizer.image.pullPolicy }} - command: - - /bin/sh - - -c - - date; echo Hello from the Kubernetes cluster + image: "{{ .Values.cloudhealth-optimizer.image.repository }}:{{ .Values.cloudhealth-optimizer.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.cloudhealth-optimizer.image.pullPolicy }} {{- with .Values.nodeSelector }} nodeSelector: diff --git a/charts/cloudhealth-collector/templates/secrets.yaml b/charts/cloudhealth-collector/templates/secrets.yaml index 6ba94bf..79cb5be 100644 --- a/charts/cloudhealth-collector/templates/secrets.yaml +++ b/charts/cloudhealth-collector/templates/secrets.yaml @@ -13,7 +13,7 @@ metadata: type: Opaque data: apiToken: {{ .Values.apiToken | b64enc | quote }} - {{- if .Values.chOptimizer.enabled }} - chapiToken: {{ .Values.chOptimizer.chapiToken | b64enc | quote }} + {{- if .Values.cloudhealth-optimizer.enabled }} + chapiToken: {{ .Values.cloudhealth-optimizer.chapiToken | b64enc | quote }} {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 5c873b0..7a6bfc1 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -93,7 +93,7 @@ devArgs: | customEnvVars: [] -chOptimizer: +cloudhealth-optimizer: enabled: false name: cloudhealth-optimizer-agent image: From 8e02f865bc065d7e33ef73ceb07c1fdb4922bbf5 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 19 Oct 2023 12:26:00 -0400 Subject: [PATCH 24/63] Fix parameter name --- charts/cloudhealth-collector/Chart.yaml | 4 ++-- charts/cloudhealth-collector/NOTES.txt | 2 +- charts/cloudhealth-collector/templates/_helpers.tpl | 2 +- .../templates/optimizer-agent-cron.yaml | 6 +++--- charts/cloudhealth-collector/templates/secrets.yaml | 4 ++-- charts/cloudhealth-collector/values.yaml | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 96cf06d..6a0c907 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,13 +5,13 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.9-alpha +version: 5.0.10-alpha appVersion: "4.1.0" dependencies: - name: cloudhealth-optimization-controller repository: file://subcharts/cloudhealth-optimization-controller version: 0.2.0 - condition: cloudhealth-optimizer.enabled + condition: optimizer.enabled home: https://cloudhealth.vmware.com/ sources: - https://github.com/CloudHealth/helm diff --git a/charts/cloudhealth-collector/NOTES.txt b/charts/cloudhealth-collector/NOTES.txt index fd00a5b..141dff9 100644 --- a/charts/cloudhealth-collector/NOTES.txt +++ b/charts/cloudhealth-collector/NOTES.txt @@ -33,6 +33,6 @@ helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOK helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,image.repository=latest-libs-06-13-3,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" --set "customEnvVars[0].name=ENV4" --set "customEnvVars[0].value=VALUE4" --set serviceAccount.name=sample_service_account ./cloudhealth-collector-1.1.2.tgz NEW ALPHA IMAGE INSTRUCTIONS: -helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set cloudhealth-optimizer.enabled=true,cloudhealth-optimizer.chapiToken=xyzabc,clusterName=test-cluster,apiToken=tttyyy cloudhealth/cloudhealth-collector --version 5.0.6-alpha +helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set optimizer.enabled=true,optimizer.chapiToken=xyzabc,clusterName=test-cluster,apiToken=tttyyy cloudhealth/cloudhealth-collector --version 5.0.6-alpha helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set clusterName=test-cluster,apiToken=tttyyy cloudhealth/cloudhealth-collector --version 5.0.6-alpha diff --git a/charts/cloudhealth-collector/templates/_helpers.tpl b/charts/cloudhealth-collector/templates/_helpers.tpl index 673a111..96fd57d 100644 --- a/charts/cloudhealth-collector/templates/_helpers.tpl +++ b/charts/cloudhealth-collector/templates/_helpers.tpl @@ -78,7 +78,7 @@ Create the name of the secrets to use Create the name for CH Optimizer Agent */}} {{- define "cloudhealth-optimizer-agent.name" -}} -{{- default .Values.cloudhealth-optimizer.name }} +{{- default .Values.optimizer.name }} {{- end }} {{/* diff --git a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml index 967bf0b..f485b61 100644 --- a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml +++ b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml @@ -3,7 +3,7 @@ Copyright 2023 VMware, Inc. SPDX-License-Identifier: Apache-2.0 */}} -{{- if .Values.cloudhealth-optimizer.enabled }} +{{- if .Values.optimizer.enabled }} apiVersion: batch/v1 kind: CronJob metadata: @@ -33,8 +33,8 @@ spec: value: {{.Values.clusterName | required "A valid clusterName required!" | quote }} - name: CHT_REGION value: {{.Values.chtRegion | default "us-east-1" }} - image: "{{ .Values.cloudhealth-optimizer.image.repository }}:{{ .Values.cloudhealth-optimizer.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.cloudhealth-optimizer.image.pullPolicy }} + image: "{{ .Values.optimizer.image.repository }}:{{ .Values.optimizer.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.optimizer.image.pullPolicy }} {{- with .Values.nodeSelector }} nodeSelector: diff --git a/charts/cloudhealth-collector/templates/secrets.yaml b/charts/cloudhealth-collector/templates/secrets.yaml index 79cb5be..fd2c4e7 100644 --- a/charts/cloudhealth-collector/templates/secrets.yaml +++ b/charts/cloudhealth-collector/templates/secrets.yaml @@ -13,7 +13,7 @@ metadata: type: Opaque data: apiToken: {{ .Values.apiToken | b64enc | quote }} - {{- if .Values.cloudhealth-optimizer.enabled }} - chapiToken: {{ .Values.cloudhealth-optimizer.chapiToken | b64enc | quote }} + {{- if .Values.optimizer.enabled }} + chapiToken: {{ .Values.optimizer.chapiToken | b64enc | quote }} {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 7a6bfc1..eebeba4 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -93,7 +93,7 @@ devArgs: | customEnvVars: [] -cloudhealth-optimizer: +optimizer: enabled: false name: cloudhealth-optimizer-agent image: From 5b09c2511426e514a7b3c5b2bb5dbf21bbc37fd0 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 19 Oct 2023 14:15:15 -0400 Subject: [PATCH 25/63] Add Spring Profile parameter --- charts/cloudhealth-collector/Chart.yaml | 2 +- .../cloudhealth-collector/templates/optimizer-agent-cron.yaml | 2 ++ charts/cloudhealth-collector/values.yaml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 6a0c907..59c9e3b 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.10-alpha +version: 5.0.11-alpha appVersion: "4.1.0" dependencies: - name: cloudhealth-optimization-controller diff --git a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml index f485b61..484795c 100644 --- a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml +++ b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml @@ -33,6 +33,8 @@ spec: value: {{.Values.clusterName | required "A valid clusterName required!" | quote }} - name: CHT_REGION value: {{.Values.chtRegion | default "us-east-1" }} + - name: SPRING_PROFILES_ACTIVE + value: {{.Values.optimizer.springProfile | default "prod" }} image: "{{ .Values.optimizer.image.repository }}:{{ .Values.optimizer.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.optimizer.image.pullPolicy }} diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index eebeba4..2c0abbe 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -96,6 +96,7 @@ customEnvVars: [] optimizer: enabled: false name: cloudhealth-optimizer-agent + springProfile: prod image: repository: cloudhealth/cloudhealth-optimizer-agent tag: "latest" From 187af4d82894faafd11a8c9eaaed218994e85c0b Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 19 Oct 2023 16:47:08 -0400 Subject: [PATCH 26/63] Update controller image registry --- charts/cloudhealth-collector/Chart.yaml | 2 +- .../subcharts/cloudhealth-optimization-controller/values.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 59c9e3b..55a9040 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.11-alpha +version: 5.0.12-alpha appVersion: "4.1.0" dependencies: - name: cloudhealth-optimization-controller diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml index d53e78b..4b2650b 100644 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml +++ b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml @@ -32,8 +32,8 @@ controllerManager: drop: - ALL image: - repository: cloudhealth/cloudhealth-optimization-controller-dev - tag: 1.0.0 + repository: projects.registry.vmware.com/kubernetes-optimization-controller/k8s-optimization-controller + tag: 0.2.0-beta resources: limits: cpu: 500m From bbe43fcdcfd048f36bacce1713450ceeed9a91a7 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 19 Oct 2023 17:27:18 -0400 Subject: [PATCH 27/63] Update path of controller helm chart. Remove subchart --- charts/cloudhealth-collector/Chart.yaml | 8 +- .../.helmignore | 23 -- .../Chart.yaml | 21 -- .../templates/_helpers.tpl | 62 ---- .../templates/deployment.yaml | 85 ------ .../templates/leader-election-rbac.yaml | 59 ---- .../templates/manager-rbac.yaml | 98 ------- .../templates/metrics-reader-rbac.yaml | 14 - .../templates/metrics-service.yaml | 17 -- .../templates/proxy-rbac.yaml | 40 --- .../templates/recommendation-crd.yaml | 214 -------------- .../templates/recommendationsetting-crd.yaml | 267 ------------------ .../templates/serviceaccount.yaml | 12 - .../values.yaml | 54 ---- charts/cloudhealth-collector/values.yaml | 37 +++ 15 files changed, 41 insertions(+), 970 deletions(-) delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/.helmignore delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/Chart.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/_helpers.tpl delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/deployment.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/leader-election-rbac.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/manager-rbac.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-reader-rbac.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-service.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/proxy-rbac.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendation-crd.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendationsetting-crd.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/serviceaccount.yaml delete mode 100644 charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 55a9040..b9e7f95 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,12 +5,12 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.12-alpha +version: 5.1.0-alpha appVersion: "4.1.0" dependencies: - - name: cloudhealth-optimization-controller - repository: file://subcharts/cloudhealth-optimization-controller - version: 0.2.0 + - name: k8s-optimization + repository: oci://projects.registry.vmware.com/kubernetes-optimization-controller + version: 0.2.0-beta condition: optimizer.enabled home: https://cloudhealth.vmware.com/ sources: diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/.helmignore b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/Chart.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/Chart.yaml deleted file mode 100644 index 34b547d..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/Chart.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v2 -name: cloudhealth-optimization-controller -description: A Helm chart for Kubernetes Optimization Controller -# 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.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. -appVersion: "0.2.0" diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/_helpers.tpl b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/_helpers.tpl deleted file mode 100644 index 3c5d167..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "k8s-optimization.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 "k8s-optimization.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 "k8s-optimization.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "k8s-optimization.labels" -}} -helm.sh/chart: {{ include "k8s-optimization.chart" . }} -{{ include "k8s-optimization.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "k8s-optimization.selectorLabels" -}} -app.kubernetes.io/name: {{ include "k8s-optimization.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "k8s-optimization.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "k8s-optimization.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/deployment.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/deployment.yaml deleted file mode 100644 index d1da076..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/deployment.yaml +++ /dev/null @@ -1,85 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "k8s-optimization.fullname" . }}-controller-manager - labels: - app.kubernetes.io/component: manager - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - control-plane: controller-manager - {{- include "k8s-optimization.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.controllerManager.replicas }} - selector: - matchLabels: - control-plane: controller-manager - {{- include "k8s-optimization.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - control-plane: controller-manager - {{- include "k8s-optimization.selectorLabels" . | nindent 8 }} - annotations: - kubectl.kubernetes.io/default-container: manager - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - amd64 - - arm64 - - ppc64le - - s390x - - key: kubernetes.io/os - operator: In - values: - - linux - 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 "k8s-optimization.fullname" . }}-controller-manager - terminationGracePeriodSeconds: 10 \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/leader-election-rbac.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/leader-election-rbac.yaml deleted file mode 100644 index fa7c242..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/leader-election-rbac.yaml +++ /dev/null @@ -1,59 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ include "k8s-optimization.fullname" . }}-leader-election-role - labels: - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - {{- include "k8s-optimization.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 "k8s-optimization.fullname" . }}-leader-election-rolebinding - labels: - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - {{- include "k8s-optimization.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: '{{ include "k8s-optimization.fullname" . }}-leader-election-role' -subjects: -- kind: ServiceAccount - name: '{{ include "k8s-optimization.fullname" . }}-controller-manager' - namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/manager-rbac.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/manager-rbac.yaml deleted file mode 100644 index f69ca2a..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/manager-rbac.yaml +++ /dev/null @@ -1,98 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "k8s-optimization.fullname" . }}-manager-role - labels: - {{- include "k8s-optimization.labels" . | nindent 4 }} -rules: -- apiGroups: - - apps - resources: - - daemonsets - - deployments - - replicasets - - statefulsets - verbs: - - delete - - get - - list - - update - - watch -- apiGroups: - - "" - resources: - - pods - verbs: - - get - - list - - watch -- apiGroups: - - k8so.vmware.com - resources: - - optimizationrecommendations - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - k8so.vmware.com - resources: - - optimizationrecommendations/finalizers - verbs: - - update -- apiGroups: - - k8so.vmware.com - resources: - - optimizationrecommendations/status - verbs: - - get - - patch - - update -- apiGroups: - - k8so.vmware.com - resources: - - optimizationrecommendationsettings - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - k8so.vmware.com - resources: - - optimizationrecommendationsettings/finalizers - verbs: - - update -- apiGroups: - - k8so.vmware.com - resources: - - optimizationrecommendationsettings/status - verbs: - - get - - patch - - update ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ include "k8s-optimization.fullname" . }}-manager-rolebinding - labels: - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - {{- include "k8s-optimization.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: '{{ include "k8s-optimization.fullname" . }}-manager-role' -subjects: -- kind: ServiceAccount - name: '{{ include "k8s-optimization.fullname" . }}-controller-manager' - namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-reader-rbac.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-reader-rbac.yaml deleted file mode 100644 index 92840bf..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-reader-rbac.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "k8s-optimization.fullname" . }}-metrics-reader - labels: - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - {{- include "k8s-optimization.labels" . | nindent 4 }} -rules: -- nonResourceURLs: - - /metrics - verbs: - - get \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-service.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-service.yaml deleted file mode 100644 index e2ec326..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/metrics-service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "k8s-optimization.fullname" . }}-controller-manager-metrics-service - labels: - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - control-plane: controller-manager - {{- include "k8s-optimization.labels" . | nindent 4 }} -spec: - type: {{ .Values.metricsService.type }} - selector: - control-plane: controller-manager - {{- include "k8s-optimization.selectorLabels" . | nindent 4 }} - ports: - {{- .Values.metricsService.ports | toYaml | nindent 2 -}} \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/proxy-rbac.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/proxy-rbac.yaml deleted file mode 100644 index 613423c..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/proxy-rbac.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "k8s-optimization.fullname" . }}-proxy-role - labels: - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - {{- include "k8s-optimization.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 "k8s-optimization.fullname" . }}-proxy-rolebinding - labels: - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - {{- include "k8s-optimization.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: '{{ include "k8s-optimization.fullname" . }}-proxy-role' -subjects: -- kind: ServiceAccount - name: '{{ include "k8s-optimization.fullname" . }}-controller-manager' - namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendation-crd.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendation-crd.yaml deleted file mode 100644 index a62466a..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendation-crd.yaml +++ /dev/null @@ -1,214 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: optimizationrecommendations.k8so.vmware.com - annotations: - controller-gen.kubebuilder.io/version: v0.11.1 - labels: - {{- include "k8s-optimization.labels" . | nindent 4 }} -spec: - group: k8so.vmware.com - names: - categories: - - recommendations - kind: OptimizationRecommendation - listKind: OptimizationRecommendationList - plural: optimizationrecommendations - singular: recommendation - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.targetRef.name - name: Target - type: string - - jsonPath: .spec.containerRecommendations[0].name - name: Container - type: string - - jsonPath: .spec.containerRecommendations[0].resources.requests['cpu'] - name: Rcmd CPU - type: string - - jsonPath: .spec.containerRecommendations[0].resources.requests['memory'] - name: Rcmd Mem - type: string - - jsonPath: .spec.replicasRecommendation - name: Rcmd Replicas - type: string - - jsonPath: .spec.updateMode - name: Update Mode - type: string - - jsonPath: .spec.manualChangeApproved - name: Man Approved - type: string - - jsonPath: .spec.lastRecommendedTime - name: Recommendation Updated At - type: string - - jsonPath: .status.updateStatus - name: Update Status - type: string - - jsonPath: .status.details.targetResourceLastUpdatedTime - name: Target Updated At - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: OptimizationRecommendation is the Schema for the optimizationrecommendations - 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: OptimizationRecommendationSpec defines the desired state of - OptimizationRecommendation - properties: - containerRecommendations: - description: Recommendations for containers that should be applied to - the target resource - items: - properties: - name: - description: Container Name - type: string - resources: - description: Recommended ResourceRequirements describes the compute - resource requirements recommendation - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - required: - - name - - resources - type: object - type: array - lastRecommendedTime: - description: Most recent date and time that this recommendation was - created or updated - format: date-time - type: string - manualChangeApproved: - description: Indicates whether the recommendation has been manually - approved for application to the target resource - enum: - - false - - true - type: boolean - replicasRecommendation: - description: Recommendation for replicas that should be applied to the - target resource - format: int32 - type: integer - targetRef: - description: TargetRef indicates the target resource for the recommendation - properties: - apiVersion: - description: API version of the referent - type: string - kind: - description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"' - type: string - name: - description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - namespace: - description: Namespace in which the referent exists - type: string - required: - - kind - - name - type: object - updateMode: - description: UpdateMode (Auto, Manual, Default) refers to modes according - to which recommendation can take place. "Auto" indicates that the - recommendation will be made and applied automatically. "Manual" indicates - that recommendation will be made but not applied until it is manually - approved. "Default" indicates that the UpdateMode will be specified - in a separate settings CR. - enum: - - Default - - Auto - - Manual - type: string - required: - - targetRef - - updateMode - type: object - status: - description: OptimizationRecommendationStatus describes the state of OptimizationRecommendation - properties: - details: - description: Details about the application of the recommendation to - the target resource - properties: - settingsUsedResourceVersion: - description: String that identifies the server's internal version - of the target resource that can be used to determine when objects - have changed. - type: string - targetResourceLastUpdatedTime: - description: Most recent date and time that the target resource - was updated - format: date-time - type: string - targetResourceVersion: - description: String that identifies the server's internal version - of the target resource that can be used to determine when objects - have changed. - type: string - type: object - updateStatus: - description: The status of the most recent update - enum: - - Pending - - AwaitingManualApproval - - Done - - TargetResourceMissing - - Failed - type: string - updateStatusDescription: - description: A description of the status of the most recent update - type: string - 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/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendationsetting-crd.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendationsetting-crd.yaml deleted file mode 100644 index 59df7c8..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/recommendationsetting-crd.yaml +++ /dev/null @@ -1,267 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: optimizationrecommendationsettings.k8so.vmware.com - annotations: - controller-gen.kubebuilder.io/version: v0.11.1 - labels: - {{- include "k8s-optimization.labels" . | nindent 4 }} -spec: - group: k8so.vmware.com - names: - categories: - - recommendationsettings - kind: OptimizationRecommendationSettings - listKind: OptimizationRecommendationSettingsList - plural: optimizationrecommendationsettings - singular: recommendationsetting - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: OptimizationRecommendationSettings is the Schema for the optimizationrecommendationsettings - 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: OptimizationRecommendationSettingsSpec defines the desired - state of OptimizationRecommendationSettings - properties: - applyTo: - description: Namespace indicating the namespace in which recommendations - reside to which these settings apply - items: - properties: - kinds: - description: Kinds to which the settings apply - items: - description: VersionedTargetKind defines the resource to which - the recommendation should be applied. If the optional APIVersion - is missing, just the Name and Kind are used to get the target - resource If the optional Namespace is missing, the namespace - of the recommendation is used to get the target resource - properties: - apiVersion: - description: API version of the referent - type: string - kind: - description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"' - type: string - required: - - kind - type: object - type: array - namespaces: - description: Namespaces to which the settings apply - items: - type: string - type: array - scopeName: - description: ScopeName is the name of the scope that defines what - recommendations the settings apply to - type: string - selector: - description: LabelSelector indicating the recommendations that - the settings applies to - items: - description: A label selector is a label query over a set of - resources. The result of matchLabels and matchExpressions - are ANDed. An empty label selector matches all objects. A - null label selector matches no objects. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. This - array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - type: array - type: object - type: array - applyToExistingPropertiesOnly: - default: false - description: 'ApplyToExistingPropertiesOnly instructs the controller - to only apply recommended settings to existing properties of the resource - and not to create new properties that are present in the recommendation, - but not in the resource Example: If a recommendation contained a resource - request for storage, but the resource (e.g. a deployment) did not - specify a storage resource request, if the flag is false, a storage - resource request will be added to the resource (e.g. a deployment), - but if the flag is true, no storage resource request will be added.' - enum: - - false - - true - type: boolean - constraintViolationPolicy: - description: 'Policy for handling constraint violations Fail: Fail if - the recommended values violate the constraints Conform: Conform the - recommended values to the constraints if they are violated and proceed - with the update' - enum: - - Fail - - Conform - type: string - containerConstraints: - description: Constraints for containers with which recommendations must - comply - properties: - resourceLowerBounds: - description: ResourceLowerBounds specifies the acceptable lower - bounds for container resources specified in a recommendations - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - resourceUpperBounds: - description: ResourceUpperBounds specifies the acceptable upper - bounds for container resources specified in a recommendations - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - type: object - defaultUpdateMode: - allOf: - - enum: - - Auto - - Manual - - enum: - - Auto - - Manual - type: string - relativePriority: - description: RelativePriority instructs the controller to apply recommended - settings that as the highest numeric RelativePriority value - format: int32 - maximum: 10 - minimum: 1 - type: integer - replicasConstraints: - description: Constraints for replicas with which recommendations must - comply - properties: - maxReplicas: - description: Maximum Replicas allowed by a recommendation Pointer - to distinguish between 0 and not set - format: int32 - type: integer - minReplicas: - description: Minimum Replicas allowed by a recommendation Pointer - to distinguish between 0 and not set - format: int32 - minimum: 0 - type: integer - type: object - useTargetRefLabelsForSelectorMatching: - description: UseTargetRefLabelsForSelectorMatching indicates whether - the labels of the target resource should be used to match the selector - enum: - - false - - true - type: boolean - required: - - defaultUpdateMode - type: object - status: - description: OptimizationRecommendationSettingsStatus defines the observed - state of OptimizationRecommendationSettings - 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/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/serviceaccount.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/serviceaccount.yaml deleted file mode 100644 index 0fb1791..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "k8s-optimization.fullname" . }}-controller-manager - labels: - app.kuberentes.io/instance: controller-manager - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: k8s-optimization - app.kubernetes.io/part-of: k8s-optimization - {{- include "k8s-optimization.labels" . | nindent 4 }} - annotations: - {{- toYaml .Values.controllerManager.serviceAccount.annotations | nindent 4 }} \ No newline at end of file diff --git a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml b/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml deleted file mode 100644 index 4b2650b..0000000 --- a/charts/cloudhealth-collector/subcharts/cloudhealth-optimization-controller/values.yaml +++ /dev/null @@ -1,54 +0,0 @@ -fullnameOverride: cloudhealth-optimization -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: projects.registry.vmware.com/kubernetes-optimization-controller/k8s-optimization-controller - tag: 0.2.0-beta - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 10m - memory: 64Mi - replicas: 1 - serviceAccount: - annotations: {} -kubernetesClusterDomain: cluster.local -metricsService: - ports: - - name: https - port: 8443 - protocol: TCP - targetPort: https - type: ClusterIP diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 2c0abbe..70ed5ab 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -103,3 +103,40 @@ optimizer: pullPolicy: "IfNotPresent" # Set to automatically create secret, or create a secret with the name specified by the 'secretName' parameter chapiToken: "" + +k8s-optimization: + fullnameOverride: cloudhealth-optimization + controllerManager: + kubeRbacProxy: + image: + repository: gcr.io/kubebuilder/kube-rbac-proxy + tag: v0.13.0 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + manager: + image: + repository: projects.registry.vmware.com/kubernetes-optimization-controller/k8s-optimization-controller + tag: 0.2.0-beta + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 100m + memory: 64Mi + replicas: 1 + serviceAccount: + annotations: {} + kubernetesClusterDomain: cluster.local + metricsService: + ports: + - name: https + port: 8443 + protocol: TCP + targetPort: https + type: ClusterIP From 7292c250feec90cf972e6af12a5f2f6b8988ae65 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 19 Oct 2023 19:24:05 -0400 Subject: [PATCH 28/63] Update controller version --- charts/cloudhealth-collector/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index b9e7f95..5361e2a 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,12 +5,12 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.1.0-alpha +version: 5.1.1-alpha appVersion: "4.1.0" dependencies: - name: k8s-optimization repository: oci://projects.registry.vmware.com/kubernetes-optimization-controller - version: 0.2.0-beta + version: 1.0.0-beta condition: optimizer.enabled home: https://cloudhealth.vmware.com/ sources: From 38677200fb4ec3cceef92bdea230be6246689804 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 19 Oct 2023 20:08:31 -0400 Subject: [PATCH 29/63] Generate correct 5.1.0-alpha chart --- charts/cloudhealth-collector/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 5361e2a..b9e7f95 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,12 +5,12 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.1.1-alpha +version: 5.1.0-alpha appVersion: "4.1.0" dependencies: - name: k8s-optimization repository: oci://projects.registry.vmware.com/kubernetes-optimization-controller - version: 1.0.0-beta + version: 0.2.0-beta condition: optimizer.enabled home: https://cloudhealth.vmware.com/ sources: From da4f9150f60e1fa1ea1bba11cae2baddd0536ae2 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 19 Oct 2023 20:09:55 -0400 Subject: [PATCH 30/63] 5.1.1-alpha chart --- charts/cloudhealth-collector/Chart.yaml | 4 ++-- charts/cloudhealth-collector/values.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index b9e7f95..5361e2a 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,12 +5,12 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.1.0-alpha +version: 5.1.1-alpha appVersion: "4.1.0" dependencies: - name: k8s-optimization repository: oci://projects.registry.vmware.com/kubernetes-optimization-controller - version: 0.2.0-beta + version: 1.0.0-beta condition: optimizer.enabled home: https://cloudhealth.vmware.com/ sources: diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 70ed5ab..2fc3b7a 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -121,7 +121,7 @@ k8s-optimization: manager: image: repository: projects.registry.vmware.com/kubernetes-optimization-controller/k8s-optimization-controller - tag: 0.2.0-beta + tag: 1.0.0-beta resources: limits: cpu: 500m From c58b4f2d24c461e13b251653122369690f14844b Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 19 Oct 2023 20:32:02 -0400 Subject: [PATCH 31/63] Regenrate helm for 0.2.0 controller --- charts/cloudhealth-collector/Chart.yaml | 4 ++-- charts/cloudhealth-collector/values.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 5361e2a..e641ff3 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,12 +5,12 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.1.1-alpha +version: 5.0.0-alpha appVersion: "4.1.0" dependencies: - name: k8s-optimization repository: oci://projects.registry.vmware.com/kubernetes-optimization-controller - version: 1.0.0-beta + version: 0.2.0-beta condition: optimizer.enabled home: https://cloudhealth.vmware.com/ sources: diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 2fc3b7a..70ed5ab 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -121,7 +121,7 @@ k8s-optimization: manager: image: repository: projects.registry.vmware.com/kubernetes-optimization-controller/k8s-optimization-controller - tag: 1.0.0-beta + tag: 0.2.0-beta resources: limits: cpu: 500m From 5ba759a973350777855341de4c2ff3411cef2e71 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 19 Oct 2023 20:32:55 -0400 Subject: [PATCH 32/63] Generate helm for 1.0.0-beta version of controller --- charts/cloudhealth-collector/Chart.yaml | 4 ++-- charts/cloudhealth-collector/values.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index e641ff3..9b03a47 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,12 +5,12 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.0.0-alpha +version: 5.1.0-alpha appVersion: "4.1.0" dependencies: - name: k8s-optimization repository: oci://projects.registry.vmware.com/kubernetes-optimization-controller - version: 0.2.0-beta + version: 1.0.0-beta condition: optimizer.enabled home: https://cloudhealth.vmware.com/ sources: diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 70ed5ab..2fc3b7a 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -121,7 +121,7 @@ k8s-optimization: manager: image: repository: projects.registry.vmware.com/kubernetes-optimization-controller/k8s-optimization-controller - tag: 0.2.0-beta + tag: 1.0.0-beta resources: limits: cpu: 500m From 53ddb2c487c60ff5083b0f410f7de2f7a580b04b Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 19 Oct 2023 20:38:07 -0400 Subject: [PATCH 33/63] 5.1.0-alpha for 0.2.0-beta controller --- charts/cloudhealth-collector/Chart.yaml | 2 +- charts/cloudhealth-collector/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 9b03a47..b9e7f95 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -10,7 +10,7 @@ appVersion: "4.1.0" dependencies: - name: k8s-optimization repository: oci://projects.registry.vmware.com/kubernetes-optimization-controller - version: 1.0.0-beta + version: 0.2.0-beta condition: optimizer.enabled home: https://cloudhealth.vmware.com/ sources: diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 2fc3b7a..70ed5ab 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -121,7 +121,7 @@ k8s-optimization: manager: image: repository: projects.registry.vmware.com/kubernetes-optimization-controller/k8s-optimization-controller - tag: 1.0.0-beta + tag: 0.2.0-beta resources: limits: cpu: 500m From 824bb38d7addce83264b7b0f5a4707b54d596e50 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 19 Oct 2023 20:38:56 -0400 Subject: [PATCH 34/63] 5.2.0-alpha for 1.0.0-beta version of controller --- charts/cloudhealth-collector/Chart.yaml | 4 ++-- charts/cloudhealth-collector/values.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index b9e7f95..f79c67f 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,12 +5,12 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.1.0-alpha +version: 5.2.0-alpha appVersion: "4.1.0" dependencies: - name: k8s-optimization repository: oci://projects.registry.vmware.com/kubernetes-optimization-controller - version: 0.2.0-beta + version: 1.0.0-beta condition: optimizer.enabled home: https://cloudhealth.vmware.com/ sources: diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 70ed5ab..2fc3b7a 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -121,7 +121,7 @@ k8s-optimization: manager: image: repository: projects.registry.vmware.com/kubernetes-optimization-controller/k8s-optimization-controller - tag: 0.2.0-beta + tag: 1.0.0-beta resources: limits: cpu: 500m From 8c3b5930435cb35e183e95aceb2d646859ad6351 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 19 Oct 2023 20:43:46 -0400 Subject: [PATCH 35/63] chapiToken to chapiKey. --- charts/cloudhealth-collector/Chart.yaml | 2 +- charts/cloudhealth-collector/NOTES.txt | 2 +- .../templates/optimizer-agent-cron.yaml | 6 +++--- charts/cloudhealth-collector/templates/secrets.yaml | 4 ++-- charts/cloudhealth-collector/values.yaml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index f79c67f..709cea6 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.2.0-alpha +version: 5.2.1-alpha appVersion: "4.1.0" dependencies: - name: k8s-optimization diff --git a/charts/cloudhealth-collector/NOTES.txt b/charts/cloudhealth-collector/NOTES.txt index 141dff9..e920b3f 100644 --- a/charts/cloudhealth-collector/NOTES.txt +++ b/charts/cloudhealth-collector/NOTES.txt @@ -33,6 +33,6 @@ helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOK helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,image.repository=latest-libs-06-13-3,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" --set "customEnvVars[0].name=ENV4" --set "customEnvVars[0].value=VALUE4" --set serviceAccount.name=sample_service_account ./cloudhealth-collector-1.1.2.tgz NEW ALPHA IMAGE INSTRUCTIONS: -helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set optimizer.enabled=true,optimizer.chapiToken=xyzabc,clusterName=test-cluster,apiToken=tttyyy cloudhealth/cloudhealth-collector --version 5.0.6-alpha +helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set optimizer.enabled=true,optimizer.chapiKey=xyzabc,clusterName=test-cluster,apiToken=tttyyy cloudhealth/cloudhealth-collector --version 5.0.6-alpha helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set clusterName=test-cluster,apiToken=tttyyy cloudhealth/cloudhealth-collector --version 5.0.6-alpha diff --git a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml index 484795c..97d4c58 100644 --- a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml +++ b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml @@ -24,11 +24,11 @@ spec: containers: - name: hello env: - - name: CHAPI_TOKEN + - name: CHAPI_KEY valueFrom: secretKeyRef: name: {{ include "cloudhealth-collector.secretName" . }} - key: chapiToken + key: chapiKey - name: CHT_CLUSTER_NAME value: {{.Values.clusterName | required "A valid clusterName required!" | quote }} - name: CHT_REGION @@ -51,4 +51,4 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} restartPolicy: OnFailure -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/cloudhealth-collector/templates/secrets.yaml b/charts/cloudhealth-collector/templates/secrets.yaml index fd2c4e7..de28335 100644 --- a/charts/cloudhealth-collector/templates/secrets.yaml +++ b/charts/cloudhealth-collector/templates/secrets.yaml @@ -14,6 +14,6 @@ type: Opaque data: apiToken: {{ .Values.apiToken | b64enc | quote }} {{- if .Values.optimizer.enabled }} - chapiToken: {{ .Values.optimizer.chapiToken | b64enc | quote }} + chapiKey: {{ .Values.optimizer.chapiKey | b64enc | quote }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 2fc3b7a..7024482 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -102,7 +102,7 @@ optimizer: tag: "latest" pullPolicy: "IfNotPresent" # Set to automatically create secret, or create a secret with the name specified by the 'secretName' parameter - chapiToken: "" + chapiKey: "" k8s-optimization: fullnameOverride: cloudhealth-optimization From 1b2965904e86f216dff39582c88c7ed54748b041 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Thu, 19 Oct 2023 20:46:18 -0400 Subject: [PATCH 36/63] Better name for cronJob pod --- .../cloudhealth-collector/templates/optimizer-agent-cron.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml index 97d4c58..c42bef2 100644 --- a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml +++ b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml @@ -22,7 +22,7 @@ spec: spec: serviceAccountName: {{ include "cloudhealth-collector.serviceAccountName" . }} containers: - - name: hello + - name: {{ include "cloudhealth-optimizer-agent.name" . }} env: - name: CHAPI_KEY valueFrom: From 7fa3c487f8f3d7772ae47d5b6f91ceb5c053f239 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Fri, 20 Oct 2023 11:24:54 -0400 Subject: [PATCH 37/63] Add ClusterRole. Fix some yaml syntax issues in values.yaml --- charts/cloudhealth-collector/Chart.yaml | 2 +- .../cloudhealth-collector/templates/clusterrole.yaml | 3 +++ charts/cloudhealth-collector/values.yaml | 11 ++++------- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 709cea6..548fff5 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.2.1-alpha +version: 5.2.2-alpha appVersion: "4.1.0" dependencies: - name: k8s-optimization diff --git a/charts/cloudhealth-collector/templates/clusterrole.yaml b/charts/cloudhealth-collector/templates/clusterrole.yaml index 7880aa5..d799270 100644 --- a/charts/cloudhealth-collector/templates/clusterrole.yaml +++ b/charts/cloudhealth-collector/templates/clusterrole.yaml @@ -22,3 +22,6 @@ rules: - apiGroups: ["batch"] resources: ["cronjobs", "jobs"] verbs: ["get", "list"] +- apiGroups: ["cloudhealth.containers.com"] + resources: ["rz-recommendation-settings"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 7024482..84eaa14 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -49,16 +49,13 @@ deployAnnotations: {} podAnnotations: {} -podSecurityContext: { - runAsNonRoot: true -} +podSecurityContext: { runAsNonRoot: true } -containerSecurityContext: { +containerSecurityContext: allowPrivilegeEscalation: false, readOnlyRootFilesystem: true, runAsNonRoot: true, capabilities: {drop: [all]} -} service: type: ClusterIP @@ -116,7 +113,7 @@ k8s-optimization: cpu: 500m memory: 128Mi requests: - cpu: 5m + cpu: 100m memory: 64Mi manager: image: @@ -127,7 +124,7 @@ k8s-optimization: cpu: 500m memory: 128Mi requests: - cpu: 100m + cpu: 250m memory: 64Mi replicas: 1 serviceAccount: From 3972a601a6a511410ea5623ec98f37ee21984da1 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Fri, 20 Oct 2023 11:40:50 -0400 Subject: [PATCH 38/63] Fixed YAML syntax on values.yaml --- charts/cloudhealth-collector/Chart.yaml | 2 +- charts/cloudhealth-collector/values.yaml | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 548fff5..bdabaae 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.2.2-alpha +version: 5.2.3-alpha appVersion: "4.1.0" dependencies: - name: k8s-optimization diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 84eaa14..29bdeb4 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -49,13 +49,15 @@ deployAnnotations: {} podAnnotations: {} -podSecurityContext: { runAsNonRoot: true } +podSecurityContext: + runAsNonRoot: true containerSecurityContext: - allowPrivilegeEscalation: false, - readOnlyRootFilesystem: true, - runAsNonRoot: true, - capabilities: {drop: [all]} + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsNonRoot: true + capabilities: + drop: [all] service: type: ClusterIP From cbbddaa837412c523a6d2331728ac61a78a14251 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Fri, 20 Oct 2023 11:52:45 -0400 Subject: [PATCH 39/63] Add Getting CRDs permission --- charts/cloudhealth-collector/Chart.yaml | 2 +- charts/cloudhealth-collector/templates/clusterrole.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index bdabaae..e5f4cb7 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.2.3-alpha +version: 5.2.4-alpha appVersion: "4.1.0" dependencies: - name: k8s-optimization diff --git a/charts/cloudhealth-collector/templates/clusterrole.yaml b/charts/cloudhealth-collector/templates/clusterrole.yaml index d799270..4a56857 100644 --- a/charts/cloudhealth-collector/templates/clusterrole.yaml +++ b/charts/cloudhealth-collector/templates/clusterrole.yaml @@ -25,3 +25,6 @@ rules: - apiGroups: ["cloudhealth.containers.com"] resources: ["rz-recommendation-settings"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] +- apiGroups: ["apiextensions.k8s.io"] + resources: ["customresourcedefinitions"] + verbs: ["get", "list", "watch"] From 1b41fcf840a75cf55d27f4564238a71ec4bc0cb7 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Fri, 20 Oct 2023 12:04:53 -0400 Subject: [PATCH 40/63] Add create permissions to serviceAccount. Also make these permissions optional based on optimizer.enabled --- charts/cloudhealth-collector/Chart.yaml | 2 +- charts/cloudhealth-collector/templates/clusterrole.yaml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index e5f4cb7..516a114 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.2.4-alpha +version: 5.2.5-alpha appVersion: "4.1.0" dependencies: - name: k8s-optimization diff --git a/charts/cloudhealth-collector/templates/clusterrole.yaml b/charts/cloudhealth-collector/templates/clusterrole.yaml index 4a56857..0a52725 100644 --- a/charts/cloudhealth-collector/templates/clusterrole.yaml +++ b/charts/cloudhealth-collector/templates/clusterrole.yaml @@ -22,9 +22,11 @@ rules: - apiGroups: ["batch"] resources: ["cronjobs", "jobs"] verbs: ["get", "list"] +{{- if .Values.optimizer.enabled }} - apiGroups: ["cloudhealth.containers.com"] resources: ["rz-recommendation-settings"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] - apiGroups: ["apiextensions.k8s.io"] resources: ["customresourcedefinitions"] - verbs: ["get", "list", "watch"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] +{{- end }} From de7e6b716a2e629906d3096049254d970606ef24 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Fri, 20 Oct 2023 12:20:56 -0400 Subject: [PATCH 41/63] Squashed commit of the following: commit 87049d3b517c9aa40be449d6c5020e02089ac6af Author: Satyam Singh Date: Fri Oct 20 21:24:37 2023 +0530 [ENG-47451] Pass region to the Collector Agent (#102) * [ENG-47451] Pass region to the Collector Agent * updating chart version * updated description * Increment collection version and restrict Region to only supported regions * Revert image version change * Update Image tag in ReadMe * Update schema to add more patterns * Remove RBAC parameter. We should always create ClusterRoleBinding * ReadMe formatting * Update version to latest and gitignore * Update icon and add annotation * Update appVersion * Newline.. I know! :-) * Update icon to Tanzu * Update README.md Co-authored-by: Tory Jaskoviak --------- Co-authored-by: Govind Mudumbai Co-authored-by: Govind Mudumbai <87672958+gm-cht@users.noreply.github.com> Co-authored-by: Tory Jaskoviak --- .gitignore | 4 +- README.md | 25 ++- charts/cloudhealth-collector/Chart.yaml | 7 +- charts/cloudhealth-collector/NOTES.txt | 16 +- .../templates/clusterrolebinding.yaml | 2 - .../templates/deployment.yaml | 2 + .../cloudhealth-collector/values.schema.json | 176 ++++++++++++++++++ charts/cloudhealth-collector/values.yaml | 15 +- 8 files changed, 210 insertions(+), 37 deletions(-) create mode 100644 charts/cloudhealth-collector/values.schema.json diff --git a/.gitignore b/.gitignore index a702d43..0e36cd1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ .DS_Store _build -*.tgz .vscode/ +.cr-release-packages/ +charts/cloudhealth-collector/charts/ Chart.lock +*.tgz diff --git a/README.md b/README.md index e1037e9..e891047 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ To avail this functionality, use this helm chart to deploy the collector agent i ```console $ helm repo add cloudhealth https://cloudhealth.github.io/helm/ -$ helm install cloudhealth-collector --set apiToken=,clusterName= cloudhealth/cloudhealth-collector +$ helm install cloudhealth-collector --set apiToken=,clusterName=,chtRegion= cloudhealth/cloudhealth-collector ``` ## Getting Started @@ -29,14 +29,14 @@ To install the chart with the release name `cloudhealth-collector`, run the foll ```console $ helm repo add cloudhealth https://cloudhealth.github.io/helm/ -$ helm install cloudhealth-collector --set apiToken=,clusterName= cloudhealth/cloudhealth-collector +$ helm install cloudhealth-collector --set apiToken=,clusterName=,chtRegion= cloudhealth/cloudhealth-collector ``` To install the chart with the release name `cloudhealth-collector` in a particular namespace ``, run the following commands: ```console $ helm repo add cloudhealth https://cloudhealth.github.io/helm/ -$ helm install cloudhealth-collector -n --set apiToken=,clusterName= cloudhealth/cloudhealth-collector +$ helm install cloudhealth-collector -n --set apiToken=,clusterName=,chtRegion= cloudhealth/cloudhealth-collector ``` The `apiToken` is required for `cloudhealth-collector` to work and should be either set while running helm install command as in the example above or in a secret object with the following data structure: @@ -69,20 +69,21 @@ $ helm repo remove cloudhealth ### Required parameters -| Name | Description | Value | -| ---------------- | -------------------------------------------------------- | -------- | -| `clusterName` | Name of the cluster to be shown on the CloudHealth UI | `""` | +| Name | Description | Value | +|---------------|-------------------------------------------------------| -------- | +| `clusterName` | Name of the cluster to be shown on the CloudHealth UI | `""` | ### Other parameters | Name | Description | Value | -| --------------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------- | +|-----------------------------|---------------------------------------------------------------------------------------------------|-----------------------------------| | `apiToken` | Unique Customer API Token provided by CloudHealth | `""` | +| `chtRegion` | CloudHealth Region (It has to be a valid AWS Region Code) | `us-east-1` | | `image.repository` | CloudHealth Collector image repository | `cloudhealth/container-collector` | -| `image.tag` | CloudHealth Collector image tag | `1203` | -| `image.pullPolicy` | CloudHealth Collector image pull policy | `IfNotPresent` | -| `image.pullSecrets` | CloudHealth Collector image pull secrets | `[]` | | +| `image.tag` | CloudHealth Collector image tag | `1398` | +| `image.pullPolicy` | CloudHealth Collector image pull policy | `IfNotPresent` | +| `image.pullSecrets` | CloudHealth Collector image pull secrets | `[]` | | `resources.limits.cpu` | The CPU limits for CloudHealth Collector containers | `1000m` | | `resources.requests.cpu` | The requested CPU for CloudHealth Collector containers | `500m` | | `resources.limits.memory` | The Memory limits for CloudHealth Collector containers | `1024Mi` | @@ -90,8 +91,6 @@ $ helm repo remove cloudhealth | `nameOverride` | String to override common.names.fullname | `""` | | `fullnameOverride` | String to fully override common.names.fullname | `""` | | `secretName` | Kubernetes secret name created to store CloudHealth API Token & Secret | `cloudhealth-config` | -| `service.type` | CloudHealth Collector UI Service Type | `ClusterIP` | -| `service.port` | CloudHealth Collector UI Service Type | `80` | | `podAnnotations` | Additional pod annotations | `{}` | | `podSecurityContext` | Enable security context for CloudHealth Collector pods | `{}` | | `securityContext` | Enable security context for CloudHealth Collector | `{}` | @@ -105,7 +104,7 @@ $ helm repo remove cloudhealth Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, the following command sets the CloudHealth Collector API Token to `sample_token` and sets the cluster name to `mega-cluster`. ```console -$ helm install cloudhealth-collector --set apiToken=sample_token,clusterName=mega-cluster cloudhealth/cloudhealth-collector +$ helm install cloudhealth-collector --set apiToken=sample_token,clusterName=mega-cluster,chtRegion=us-east-1 cloudhealth/cloudhealth-collector ``` Example with `customEnvVars` diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 516a114..8da20cb 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,16 +5,19 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.2.5-alpha -appVersion: "4.1.0" +version: 5.3.0-alpha +appVersion: "4.2.0" dependencies: - name: k8s-optimization repository: oci://projects.registry.vmware.com/kubernetes-optimization-controller version: 1.0.0-beta condition: optimizer.enabled home: https://cloudhealth.vmware.com/ +icon: https://d1fto35gcfffzn.cloudfront.net/images/Tanzu-Logomark.svg sources: - https://github.com/CloudHealth/helm maintainers: - name: CloudHealth Team email: cht-core-containers@groups.vmware.com +annotations: + category: Cost diff --git a/charts/cloudhealth-collector/NOTES.txt b/charts/cloudhealth-collector/NOTES.txt index e920b3f..788ba9a 100644 --- a/charts/cloudhealth-collector/NOTES.txt +++ b/charts/cloudhealth-collector/NOTES.txt @@ -5,22 +5,22 @@ helm repo add cloudhealth https://cloudhealth.github.io/helm/ To dry-run the helm chart: -helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME cloudhealth/cloudhealth-collector +helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,chtRegion=$CHT_REGION cloudhealth/cloudhealth-collector To install helm for local collection dev testing: -helm install cloudhealth-collector --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" cloudhealth/cloudhealth-collector +helm install cloudhealth-collector --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,chtRegion=$CHT_REGION --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" cloudhealth/cloudhealth-collector -helm upgrade cloudhealth-collector -n dmz --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\]" cloudhealth/cloudhealth-collector +helm upgrade cloudhealth-collector -n dmz --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,chtRegion=$CHT_REGION --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\]" cloudhealth/cloudhealth-collector -helm install cloudhealth-collector --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,image.repository=cloudhealth/container-collector-dev cloudhealth/cloudhealth-collector +helm install cloudhealth-collector --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,chtRegion=$CHT_REGION,image.repository=cloudhealth/container-collector-dev cloudhealth/cloudhealth-collector -helm install cloudhealth-collector --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,image.repository=latest-libs,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" cloudhealth/cloudhealth-collector +helm install cloudhealth-collector --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,chtRegion=$CHT_REGION,image.repository=latest-libs,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" cloudhealth/cloudhealth-collector -helm install cloudhealth-collector --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,image.repository=metrics-collector-1,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" cloudhealth/cloudhealth-collector -helm install cloudhealth-collector --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,image.repository=latest-libs-1,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" cloudhealth/cloudhealth-collector +helm install cloudhealth-collector --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,chtRegion=$CHT_REGION,image.repository=metrics-collector-1,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" cloudhealth/cloudhealth-collector +helm install cloudhealth-collector --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,chtRegion=$CHT_REGION,image.repository=latest-libs-1,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" cloudhealth/cloudhealth-collector --set "customEnvVars[0].name=ENV4" --set "customEnvVars[0].value=VALUE4" @@ -28,7 +28,7 @@ helm install cloudhealth-collector --set apiToken=$CHT_API_TOKEN,clusterName=$CH upload_k8s_state_v2 --verbose --endpoint http://:9292 -helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,image.repository=latest-libs-06-13-3,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]",podSecurityContext.fsGroup=2000,containerSecurityContext.readOnlyRootFilesystem=true,containerSecurityContext.runAsNonRoot=true,containerSecurityContext.runAsUser=1000,containerSecurityContext.capabilities.drop={ALL} ./cloudhealth-collector-1.1.3.tgz +helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,chtRegion=$CHT_REGION,image.repository=latest-libs-06-13-3,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]",podSecurityContext.fsGroup=2000,containerSecurityContext.readOnlyRootFilesystem=true,containerSecurityContext.runAsNonRoot=true,containerSecurityContext.runAsUser=1000,containerSecurityContext.capabilities.drop={ALL} ./cloudhealth-collector-1.1.3.tgz helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,image.repository=latest-libs-06-13-3,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" --set "customEnvVars[0].name=ENV4" --set "customEnvVars[0].value=VALUE4" --set serviceAccount.name=sample_service_account ./cloudhealth-collector-1.1.2.tgz diff --git a/charts/cloudhealth-collector/templates/clusterrolebinding.yaml b/charts/cloudhealth-collector/templates/clusterrolebinding.yaml index ff71638..d83d1d7 100644 --- a/charts/cloudhealth-collector/templates/clusterrolebinding.yaml +++ b/charts/cloudhealth-collector/templates/clusterrolebinding.yaml @@ -3,7 +3,6 @@ Copyright 2023 VMware, Inc. SPDX-License-Identifier: Apache-2.0 */}} -{{- if .Values.rbac.create -}} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -18,4 +17,3 @@ roleRef: kind: ClusterRole name: {{ include "cloudhealth-collector.fullname" . }} apiGroup: rbac.authorization.k8s.io -{{- end }} diff --git a/charts/cloudhealth-collector/templates/deployment.yaml b/charts/cloudhealth-collector/templates/deployment.yaml index 25d5fff..e6743a1 100644 --- a/charts/cloudhealth-collector/templates/deployment.yaml +++ b/charts/cloudhealth-collector/templates/deployment.yaml @@ -62,6 +62,8 @@ spec: key: apiToken - name: CHT_CLUSTER_NAME value: {{.Values.clusterName | required "A valid clusterName required!" | quote }} + - name: CHT_REGION + value: {{.Values.chtRegion | default "us-east-1" }} - name: CHT_INTERVAL value: {{ .Values.collectionIntervalSecs | quote }} - name: CHT_JVM_MEM diff --git a/charts/cloudhealth-collector/values.schema.json b/charts/cloudhealth-collector/values.schema.json new file mode 100644 index 0000000..152df1f --- /dev/null +++ b/charts/cloudhealth-collector/values.schema.json @@ -0,0 +1,176 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "apiToken", + "clusterName", + "chtRegion", + "collectionIntervalSecs", + "jvmMemory", + "image", + "secretName", + "serviceAccount", + "podSecurityContext", + "containerSecurityContext", + "resources", + "liveness", + "devArgs" + ], + "properties": { + "apiToken": { + "type": "string", + "pattern": "^.{6,48}$" + }, + "clusterName": { + "type": "string", + "pattern": "^.{1,255}$" + }, + "chtRegion": { + "type": "string", + "pattern": "^(us-east-1|us-east-2)$" + }, + "collectionIntervalSecs": { + "type": "integer", + "minimum": 900 + }, + "jvmMemory": { + "type": "string" + }, + "image": { + "type": "object", + "required": [ + "repository", + "tag" + ], + "properties": { + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "secretName": { + "type": "string" + }, + "serviceAccount": { + "type": "object", + "required": [ + "create" + ], + "properties": { + "create": { + "type": "boolean" + } + } + }, + "podSecurityContext": { + "type": "object", + "required": [ + "runAsNonRoot" + ], + "properties": { + "runAsNonRoot": { + "type": "boolean" + } + } + }, + "containerSecurityContext": { + "type": "object", + "required": [ + "allowPrivilegeEscalation", + "readOnlyRootFilesystem", + "runAsNonRoot", + "capabilities" + ], + "properties": { + "allowPrivilegeEscalation": { + "type": "boolean" + }, + "readOnlyRootFilesystem": { + "type": "boolean" + }, + "runAsNonRoot": { + "type": "boolean" + }, + "capabilities": { + "type": "object", + "default": {}, + "required": [ + "drop" + ], + "properties": { + "drop": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "resources": { + "type": "object", + "required": [ + "limits", + "requests" + ], + "properties": { + "limits": { + "type": "object", + "required": [ + "cpu", + "memory" + ], + "properties": { + "cpu": { + "type": "string" + }, + "memory": { + "type": "string" + } + } + }, + "requests": { + "type": "object", + "required": [ + "cpu", + "memory" + ], + "properties": { + "cpu": { + "type": "string" + }, + "memory": { + "type": "string" + } + } + } + } + }, + "liveness": { + "type": "object", + "required": [ + "initialDelaySeconds", + "failureThreshold", + "periodSeconds" + ], + "properties": { + "initialDelaySeconds": { + "type": "integer" + }, + "failureThreshold": { + "type": "integer" + }, + "periodSeconds": { + "type": "integer" + } + } + }, + "devArgs": { + "type": "string" + } + } +} diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 29bdeb4..4988d18 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -11,6 +11,9 @@ apiToken: "" # Required value, to be uniquely specified per deployment: clusterName: "" +# default value for Region +chtRegion: us-east-1 + # The remaining are default values collectionIntervalSecs: 900 @@ -24,8 +27,7 @@ jvmMemory: "-Xmx891M" image: repository: cloudhealth/container-collector - tag: "1360" - pullPolicy: "IfNotPresent" + tag: "1398" imagePullSecrets: [] nameOverride: "" @@ -59,10 +61,6 @@ containerSecurityContext: capabilities: drop: [all] -service: - type: ClusterIP - port: 80 - resources: limits: cpu: 1000m @@ -82,11 +80,6 @@ tolerations: [] affinity: {} -# Role-based Access Control -rbac: - # Specifies whether RBAC resources should be created - create: true - devArgs: | ['upload_k8s_state_v4', '--verbose'] From a43249e3bb7ab1ab0f717da04ada77df2eac79c6 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 23 Oct 2023 09:44:16 -0400 Subject: [PATCH 42/63] Fixes due to merge --- charts/cloudhealth-collector/Chart.yaml | 2 +- charts/cloudhealth-collector/NOTES.txt | 2 +- charts/cloudhealth-collector/templates/deployment.yaml | 4 ++-- .../cloudhealth-collector/templates/optimizer-agent-cron.yaml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index d0d0f8a..1e8ee75 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.3.1-alpha +version: 5.3.2-alpha appVersion: "5.1.0" dependencies: - name: k8s-optimization diff --git a/charts/cloudhealth-collector/NOTES.txt b/charts/cloudhealth-collector/NOTES.txt index 788ba9a..fe00a6b 100644 --- a/charts/cloudhealth-collector/NOTES.txt +++ b/charts/cloudhealth-collector/NOTES.txt @@ -30,7 +30,7 @@ upload_k8s_state_v2 --verbose --endpoint http://:9292 helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,chtRegion=$CHT_REGION,image.repository=latest-libs-06-13-3,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]",podSecurityContext.fsGroup=2000,containerSecurityContext.readOnlyRootFilesystem=true,containerSecurityContext.runAsNonRoot=true,containerSecurityContext.runAsUser=1000,containerSecurityContext.capabilities.drop={ALL} ./cloudhealth-collector-1.1.3.tgz -helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,image.repository=latest-libs-06-13-3,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" --set "customEnvVars[0].name=ENV4" --set "customEnvVars[0].value=VALUE4" --set serviceAccount.name=sample_service_account ./cloudhealth-collector-1.1.2.tgz +helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,chtRegion=$CHT_REGION,image.repository=latest-libs-06-13-3,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" --set "customEnvVars[0].name=ENV4" --set "customEnvVars[0].value=VALUE4" --set serviceAccount.name=sample_service_account ./cloudhealth-collector-1.1.2.tgz NEW ALPHA IMAGE INSTRUCTIONS: helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set optimizer.enabled=true,optimizer.chapiKey=xyzabc,clusterName=test-cluster,apiToken=tttyyy cloudhealth/cloudhealth-collector --version 5.0.6-alpha diff --git a/charts/cloudhealth-collector/templates/deployment.yaml b/charts/cloudhealth-collector/templates/deployment.yaml index e6743a1..e806ba9 100644 --- a/charts/cloudhealth-collector/templates/deployment.yaml +++ b/charts/cloudhealth-collector/templates/deployment.yaml @@ -33,7 +33,7 @@ spec: {{- end }} containers: - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}" imagePullPolicy: {{ .Values.image.pullPolicy }} resources: {{- toYaml .Values.resources | nindent 12 }} @@ -61,7 +61,7 @@ spec: name: {{ include "cloudhealth-collector.secretName" . }} key: apiToken - name: CHT_CLUSTER_NAME - value: {{.Values.clusterName | required "A valid clusterName required!" | quote }} + value: {{.Values.clusterName | required "A valid clusterName is required!" | quote }} - name: CHT_REGION value: {{.Values.chtRegion | default "us-east-1" }} - name: CHT_INTERVAL diff --git a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml index c42bef2..c65443a 100644 --- a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml +++ b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml @@ -35,7 +35,7 @@ spec: value: {{.Values.chtRegion | default "us-east-1" }} - name: SPRING_PROFILES_ACTIVE value: {{.Values.optimizer.springProfile | default "prod" }} - image: "{{ .Values.optimizer.image.repository }}:{{ .Values.optimizer.image.tag | default .Chart.AppVersion }}" + image: "{{ .Values.optimizer.image.repository }}:{{ .Values.optimizer.image.tag | default "latest" }}" imagePullPolicy: {{ .Values.optimizer.image.pullPolicy }} {{- with .Values.nodeSelector }} From 8247611aadc03f78735d96c9fce8d310d6cf5605 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 23 Oct 2023 10:08:25 -0400 Subject: [PATCH 43/63] Fix english --- .../cloudhealth-collector/templates/optimizer-agent-cron.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml index c65443a..24b2d53 100644 --- a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml +++ b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml @@ -30,7 +30,7 @@ spec: name: {{ include "cloudhealth-collector.secretName" . }} key: chapiKey - name: CHT_CLUSTER_NAME - value: {{.Values.clusterName | required "A valid clusterName required!" | quote }} + value: {{.Values.clusterName | required "A valid clusterName is required!" | quote }} - name: CHT_REGION value: {{.Values.chtRegion | default "us-east-1" }} - name: SPRING_PROFILES_ACTIVE From 485fae9e56eebea6134a008b2ec38e4f10ff5bc5 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 23 Oct 2023 10:12:14 -0400 Subject: [PATCH 44/63] Move registry to `kubernetes-optimization` --- charts/cloudhealth-collector/Chart.yaml | 4 ++-- charts/cloudhealth-collector/values.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 1e8ee75..245f5ca 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,11 +5,11 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.3.2-alpha +version: 5.4.0-alpha appVersion: "5.1.0" dependencies: - name: k8s-optimization - repository: oci://projects.registry.vmware.com/kubernetes-optimization-controller + repository: oci://projects.registry.vmware.com/kubernetes-optimization version: 1.0.0-beta condition: optimizer.enabled home: https://cloudhealth.vmware.com/ diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 4988d18..13c9032 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -112,7 +112,7 @@ k8s-optimization: memory: 64Mi manager: image: - repository: projects.registry.vmware.com/kubernetes-optimization-controller/k8s-optimization-controller + repository: projects.registry.vmware.com/kubernetes-optimization/k8s-optimization-controller tag: 1.0.0-beta resources: limits: From 988a36e42e9259ce6a248c86774c44355b3ba70c Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 23 Oct 2023 11:26:51 -0400 Subject: [PATCH 45/63] Remove Image tags from being overridden in main chart --- charts/cloudhealth-collector/Chart.yaml | 2 +- charts/cloudhealth-collector/values.yaml | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 245f5ca..d2072bf 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.4.0-alpha +version: 5.4.1-alpha appVersion: "5.1.0" dependencies: - name: k8s-optimization diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 13c9032..06f436f 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -100,9 +100,6 @@ k8s-optimization: fullnameOverride: cloudhealth-optimization controllerManager: kubeRbacProxy: - image: - repository: gcr.io/kubebuilder/kube-rbac-proxy - tag: v0.13.0 resources: limits: cpu: 500m @@ -111,9 +108,6 @@ k8s-optimization: cpu: 100m memory: 64Mi manager: - image: - repository: projects.registry.vmware.com/kubernetes-optimization/k8s-optimization-controller - tag: 1.0.0-beta resources: limits: cpu: 500m @@ -124,11 +118,3 @@ k8s-optimization: replicas: 1 serviceAccount: annotations: {} - kubernetesClusterDomain: cluster.local - metricsService: - ports: - - name: https - port: 8443 - protocol: TCP - targetPort: https - type: ClusterIP From b2fc51fe7870687920716ce3f5fb1020ffa1db23 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Tue, 24 Oct 2023 21:54:59 -0400 Subject: [PATCH 46/63] Change imagePullPolicy --- charts/cloudhealth-collector/Chart.yaml | 2 +- charts/cloudhealth-collector/values.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index d2072bf..41b00a9 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.4.1-alpha +version: 5.4.2-alpha appVersion: "5.1.0" dependencies: - name: k8s-optimization diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 06f436f..2282a3c 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -92,7 +92,6 @@ optimizer: image: repository: cloudhealth/cloudhealth-optimizer-agent tag: "latest" - pullPolicy: "IfNotPresent" # Set to automatically create secret, or create a secret with the name specified by the 'secretName' parameter chapiKey: "" From 9c18debae3300bde42bea8356417418556a01f5b Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Wed, 25 Oct 2023 16:44:57 -0400 Subject: [PATCH 47/63] Update permissions --- README.md | 20 +++++++++++++++++-- charts/cloudhealth-collector/Chart.yaml | 2 +- .../templates/clusterrole.yaml | 3 +++ cloudhealth-collector-image-docs/CHANGELOG.md | 6 ++++++ 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e891047..864d167 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Use the helm chart to deploy the CloudHealth Collector into each [Kubernetes](ht - Helm 3.0+ - CloudHealth API Token -## Installing the Chart +## Installing the Collector Chart To install the chart with the release name `cloudhealth-collector`, run the following command: @@ -36,7 +36,7 @@ To install the chart with the release name `cloudhealth-collector` in a particul ```console $ helm repo add cloudhealth https://cloudhealth.github.io/helm/ -$ helm install cloudhealth-collector -n --set apiToken=,clusterName=,chtRegion= cloudhealth/cloudhealth-collector +$ helm install cloudhealth-collector -n --create-namespace --set apiToken=,clusterName=,chtRegion= cloudhealth/cloudhealth-collector ``` The `apiToken` is required for `cloudhealth-collector` to work and should be either set while running helm install command as in the example above or in a secret object with the following data structure: @@ -49,6 +49,22 @@ These commands deploy the CloudHealth Collector on the Kubernetes cluster in the > **Tip**: List all releases using `helm list` +## Installing the Collector & Optimizer Chart + +To install the chart with the release name `cloudhealth-collector-optimizer`, run the following command: + +```console +$ helm repo add cloudhealth https://cloudhealth.github.io/helm/ +$ helm install cloudhealth-collector-optimizer --set apiToken=,clusterName=,chtRegion=,optimizer.enabled=true,chapiKey= cloudhealth/cloudhealth-collector +``` + +To install the chart with the release name `cloudhealth-collector-optimizer` in a particular namespace ``, run the following commands: + +```console +$ helm repo add cloudhealth https://cloudhealth.github.io/helm/ +$ helm install cloudhealth-collector-optimizer -n --create-namespace --set apiToken=,clusterName=,chtRegion=,optimizer.enabled=true,chapiKey= cloudhealth/cloudhealth-collector +``` + ## Updating the Chart To update an existing release to the latest version of the chart, run the following command: diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 41b00a9..011dfd5 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.4.2-alpha +version: 5.4.3-alpha appVersion: "5.1.0" dependencies: - name: k8s-optimization diff --git a/charts/cloudhealth-collector/templates/clusterrole.yaml b/charts/cloudhealth-collector/templates/clusterrole.yaml index 0a52725..bd93b87 100644 --- a/charts/cloudhealth-collector/templates/clusterrole.yaml +++ b/charts/cloudhealth-collector/templates/clusterrole.yaml @@ -29,4 +29,7 @@ rules: - apiGroups: ["apiextensions.k8s.io"] resources: ["customresourcedefinitions"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] +- apiGroups: ["k8so.vmware.com"] + resources: ["optimizationrecommendations"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] {{- end }} diff --git a/cloudhealth-collector-image-docs/CHANGELOG.md b/cloudhealth-collector-image-docs/CHANGELOG.md index 54f5cb2..e1f5fe4 100644 --- a/cloudhealth-collector-image-docs/CHANGELOG.md +++ b/cloudhealth-collector-image-docs/CHANGELOG.md @@ -10,6 +10,12 @@ The agent has been verified against: All versions before June 20, 2022 have been deprecated. +## [1398] - 2023-10-23 + +### Added + +* The collector docker image now supports multiple regions(us-east-1 & us-east-2). optional parameter `chtRegion` added. Default: `us-east-1` + ## [1360] - 2023-07-19 ### Added From 14c2074733947553eec6d27d9e428a9e45b56709 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 30 Oct 2023 14:21:19 -0400 Subject: [PATCH 48/63] Set default requests and limits for optimizer agent. --- charts/cloudhealth-collector/Chart.yaml | 2 +- .../templates/optimizer-agent-cron.yaml | 2 ++ charts/cloudhealth-collector/values.yaml | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 011dfd5..158f705 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.4.3-alpha +version: 5.4.4-alpha appVersion: "5.1.0" dependencies: - name: k8s-optimization diff --git a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml index 24b2d53..4c83931 100644 --- a/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml +++ b/charts/cloudhealth-collector/templates/optimizer-agent-cron.yaml @@ -37,6 +37,8 @@ spec: value: {{.Values.optimizer.springProfile | default "prod" }} image: "{{ .Values.optimizer.image.repository }}:{{ .Values.optimizer.image.tag | default "latest" }}" imagePullPolicy: {{ .Values.optimizer.image.pullPolicy }} + resources: + {{- toYaml .Values.optimizer.resources | nindent 14 }} {{- with .Values.nodeSelector }} nodeSelector: diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 2282a3c..b14c413 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -94,6 +94,13 @@ optimizer: tag: "latest" # Set to automatically create secret, or create a secret with the name specified by the 'secretName' parameter chapiKey: "" + resources: + limits: + cpu: 1000m + memory: 512Mi + requests: + cpu: 250m + memory: 128Mi k8s-optimization: fullnameOverride: cloudhealth-optimization From 1c21afc5645a18ae80d73b4a4318726356677d9f Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Tue, 31 Oct 2023 14:58:03 -0400 Subject: [PATCH 49/63] Beta Version release --- charts/cloudhealth-collector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 158f705..fa416b0 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.4.4-alpha +version: 5.5.0-beta appVersion: "5.1.0" dependencies: - name: k8s-optimization From e76377a82dccf32998da948f6f7da50d071c7e0d Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Tue, 31 Oct 2023 22:08:32 -0400 Subject: [PATCH 50/63] Fix ReadMe --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 864d167..757eda1 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,14 @@ Use the helm chart to deploy the CloudHealth Collector into each [Kubernetes](ht ## Installing the Collector Chart -To install the chart with the release name `cloudhealth-collector`, run the following command: +To install the chart with the release name `cloudhealth-collector` in the `default` namespace, run the following commands: ```console $ helm repo add cloudhealth https://cloudhealth.github.io/helm/ $ helm install cloudhealth-collector --set apiToken=,clusterName=,chtRegion= cloudhealth/cloudhealth-collector ``` -To install the chart with the release name `cloudhealth-collector` in a particular namespace ``, run the following commands: +To install the chart with the release name `cloudhealth-collector` in a specified namespace ``, run the following commands: ```console $ helm repo add cloudhealth https://cloudhealth.github.io/helm/ @@ -51,14 +51,14 @@ These commands deploy the CloudHealth Collector on the Kubernetes cluster in the ## Installing the Collector & Optimizer Chart -To install the chart with the release name `cloudhealth-collector-optimizer`, run the following command: +To install the chart with the release name `cloudhealth-collector-optimizer` in the `default` namespace, run the following commands: ```console $ helm repo add cloudhealth https://cloudhealth.github.io/helm/ $ helm install cloudhealth-collector-optimizer --set apiToken=,clusterName=,chtRegion=,optimizer.enabled=true,chapiKey= cloudhealth/cloudhealth-collector ``` -To install the chart with the release name `cloudhealth-collector-optimizer` in a particular namespace ``, run the following commands: +To install the chart with the release name `cloudhealth-collector-optimizer` in a specified namespace ``, run the following commands: ```console $ helm repo add cloudhealth https://cloudhealth.github.io/helm/ From 64854f6ec2fac322effd7e6cdcae67199947a1eb Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Wed, 1 Nov 2023 14:08:19 -0400 Subject: [PATCH 51/63] Fixed Notes --- charts/cloudhealth-collector/NOTES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cloudhealth-collector/NOTES.txt b/charts/cloudhealth-collector/NOTES.txt index fe00a6b..9969f05 100644 --- a/charts/cloudhealth-collector/NOTES.txt +++ b/charts/cloudhealth-collector/NOTES.txt @@ -33,6 +33,6 @@ helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOK helm install cloudhealth-collector --debug --dry-run --set apiToken=$CHT_API_TOKEN,clusterName=$CHT_CLUSTER_NAME,chtRegion=$CHT_REGION,image.repository=latest-libs-06-13-3,image.pullPolicy=Never --set devArgs="\['upload_k8s_state_v2'\,'--verbose'\,'--endpoint'\,'http://:9292'\]" --set "customEnvVars[0].name=ENV4" --set "customEnvVars[0].value=VALUE4" --set serviceAccount.name=sample_service_account ./cloudhealth-collector-1.1.2.tgz NEW ALPHA IMAGE INSTRUCTIONS: -helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set optimizer.enabled=true,optimizer.chapiKey=xyzabc,clusterName=test-cluster,apiToken=tttyyy cloudhealth/cloudhealth-collector --version 5.0.6-alpha +helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set optimizer.enabled=true,optimizer.chapiKey=$CHAPI_KEY,clusterName=$CHT_CLUSTER_NAME,apiToken=$CHT_API_TOKEN cloudhealth/cloudhealth-collector --version 5.5.0-beta -helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set clusterName=test-cluster,apiToken=tttyyy cloudhealth/cloudhealth-collector --version 5.0.6-alpha +helm install cloudhealth-collector --debug --dry-run -n cloudhealth --set clusterName=$CHT_CLUSTER_NAME,apiToken=$CHT_API_TOKEN cloudhealth/cloudhealth-collector --version 5.5.0-beta From 13d9428db134aee2d64e9c5ece8267b060088b4f Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Wed, 1 Nov 2023 14:09:23 -0400 Subject: [PATCH 52/63] Minor Chart version change --- charts/cloudhealth-collector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index fa416b0..edc50da 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.5.0-beta +version: 5.5.1-beta appVersion: "5.1.0" dependencies: - name: k8s-optimization From 03c2529446ebe0cfe552c087edbdc8a50fa81500 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 13 Nov 2023 09:17:15 -0500 Subject: [PATCH 53/63] Add better checks for cluster_name --- charts/cloudhealth-collector/Chart.yaml | 2 +- charts/cloudhealth-collector/values.schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index edc50da..4f69dec 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.5.1-beta +version: 5.5.2-beta appVersion: "5.1.0" dependencies: - name: k8s-optimization diff --git a/charts/cloudhealth-collector/values.schema.json b/charts/cloudhealth-collector/values.schema.json index 152df1f..992dcbc 100644 --- a/charts/cloudhealth-collector/values.schema.json +++ b/charts/cloudhealth-collector/values.schema.json @@ -23,7 +23,7 @@ }, "clusterName": { "type": "string", - "pattern": "^.{1,255}$" + "pattern": "^[a-z0-9-_.]{6,255}$" }, "chtRegion": { "type": "string", From b7337cd5ea21fcf0d36e2520a6b7559591e7563d Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Tue, 14 Nov 2023 09:59:16 -0500 Subject: [PATCH 54/63] Change clusterName check to minimum 3 characters and minInterval to 10 mins --- charts/cloudhealth-collector/Chart.yaml | 2 +- charts/cloudhealth-collector/values.schema.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index ef0bd39..aa4e33a 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.5.3-beta +version: 5.5.4-beta appVersion: "5.1.0" dependencies: - name: k8s-optimization diff --git a/charts/cloudhealth-collector/values.schema.json b/charts/cloudhealth-collector/values.schema.json index 992dcbc..6ed44a9 100644 --- a/charts/cloudhealth-collector/values.schema.json +++ b/charts/cloudhealth-collector/values.schema.json @@ -23,7 +23,7 @@ }, "clusterName": { "type": "string", - "pattern": "^[a-z0-9-_.]{6,255}$" + "pattern": "^[a-z0-9-_.]{3,255}$" }, "chtRegion": { "type": "string", @@ -31,7 +31,7 @@ }, "collectionIntervalSecs": { "type": "integer", - "minimum": 900 + "minimum": 600 }, "jvmMemory": { "type": "string" From 3b47c17e7263575935350006709467ea4e845cd3 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Mon, 27 Nov 2023 09:18:42 -0500 Subject: [PATCH 55/63] Update Optimization controller to 1.0.2-beta --- charts/cloudhealth-collector/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index aa4e33a..511c23f 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,12 +5,12 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.5.4-beta +version: 5.6.0-beta appVersion: "5.1.0" dependencies: - name: k8s-optimization repository: oci://projects.registry.vmware.com/kubernetes-optimization - version: 1.0.0-beta + version: 1.0.2-beta condition: optimizer.enabled home: https://cloudhealth.vmware.com/ icon: https://d1fto35gcfffzn.cloudfront.net/images/Tanzu-Logomark.svg From 80d20df849f791909f72ea62ee3e017afaf10f81 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Tue, 2 Jan 2024 14:50:30 -0500 Subject: [PATCH 56/63] Fix optimizer version to 1.1.0 --- charts/cloudhealth-collector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 514c87c..ab97d3b 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -10,7 +10,7 @@ appVersion: "5.2.0" dependencies: - name: k8s-optimization repository: oci://projects.registry.vmware.com/kubernetes-optimization - version: 1.0.0 + version: 1.1.0 condition: optimizer.enabled home: https://cloudhealth.vmware.com/ icon: https://d1fto35gcfffzn.cloudfront.net/images/Tanzu-Logomark.svg From cb826cf6ba5197fa992e49577250357a5083f605 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Sun, 28 Jan 2024 21:16:55 -0500 Subject: [PATCH 57/63] Hardcode Optimizer Agent Image to 1.0.0-18 --- charts/cloudhealth-collector/Chart.yaml | 2 +- charts/cloudhealth-collector/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 54e2ee4..51d5f18 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.7.1-beta +version: 5.7.2-beta appVersion: "5.2.0" dependencies: - name: k8s-optimization diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 6355b14..7c3df92 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -94,7 +94,7 @@ optimizer: springProfile: prod image: repository: cloudhealth/cloudhealth-optimizer-agent - tag: "latest" + tag: "1.0.0-18" # Set to automatically create secret, or create a secret with the name specified by the 'secretName' parameter chapiKey: "" resources: From d052fc276d1d71349fe5dc1ac7015a1631602134 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Wed, 31 Jan 2024 11:07:58 -0500 Subject: [PATCH 58/63] Update Optimizer Agent to 1.0.0-19 --- charts/cloudhealth-collector/Chart.yaml | 4 ++-- charts/cloudhealth-collector/values.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 51d5f18..1491ea9 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,8 +5,8 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.7.2-beta -appVersion: "5.2.0" +version: 5.8.0-beta +appVersion: "5.3.0" dependencies: - name: k8s-optimization repository: oci://projects.registry.vmware.com/kubernetes-optimization diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 7c3df92..4785c57 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -94,7 +94,7 @@ optimizer: springProfile: prod image: repository: cloudhealth/cloudhealth-optimizer-agent - tag: "1.0.0-18" + tag: "1.0.0-19" # Set to automatically create secret, or create a secret with the name specified by the 'secretName' parameter chapiKey: "" resources: From 1e8715566da345884c536a6a8634f02c08712dd9 Mon Sep 17 00:00:00 2001 From: Govind Mudumbai Date: Wed, 31 Jan 2024 22:28:46 -0500 Subject: [PATCH 59/63] Update to Controller 1.1.1 & Increase CPU/Mem of optimizer and Controller --- charts/cloudhealth-collector/Chart.yaml | 4 ++-- charts/cloudhealth-collector/values.yaml | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index 1491ea9..c825f72 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,12 +5,12 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.8.0-beta +version: 5.8.1-beta appVersion: "5.3.0" dependencies: - name: k8s-optimization repository: oci://projects.registry.vmware.com/kubernetes-optimization - version: 1.1.0 + version: 1.1.1 condition: optimizer.enabled home: https://cloudhealth.vmware.com/ icon: https://d1fto35gcfffzn.cloudfront.net/images/Tanzu-Logomark.svg diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 4785c57..9d7e074 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -100,10 +100,10 @@ optimizer: resources: limits: cpu: 1000m - memory: 512Mi + memory: 1024Mi requests: - cpu: 250m - memory: 128Mi + cpu: 500m + memory: 512Mi k8s-optimization: fullnameOverride: cloudhealth-optimization @@ -112,18 +112,18 @@ k8s-optimization: resources: limits: cpu: 500m - memory: 128Mi + memory: 512Mi requests: cpu: 100m - memory: 64Mi + memory: 256Mi manager: resources: limits: - cpu: 500m - memory: 128Mi + cpu: 1000m + memory: 2048Mi requests: - cpu: 250m - memory: 64Mi + cpu: 500m + memory: 512Mi replicas: 1 serviceAccount: annotations: {} From b630e7c2df8293970f9beb4ab8b295328fad7183 Mon Sep 17 00:00:00 2001 From: Katie Hooley Date: Tue, 20 Feb 2024 18:19:30 -0500 Subject: [PATCH 60/63] Update Optimizer Agent to 1.0.0-20 (#115) Co-authored-by: Jackson da Cruz --- charts/cloudhealth-collector/Chart.yaml | 4 ++-- charts/cloudhealth-collector/values.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index c825f72..f1cdaa8 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,8 +5,8 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.8.1-beta -appVersion: "5.3.0" +version: 5.9.0-beta +appVersion: "5.4.0" dependencies: - name: k8s-optimization repository: oci://projects.registry.vmware.com/kubernetes-optimization diff --git a/charts/cloudhealth-collector/values.yaml b/charts/cloudhealth-collector/values.yaml index 9d7e074..4b9e1b7 100644 --- a/charts/cloudhealth-collector/values.yaml +++ b/charts/cloudhealth-collector/values.yaml @@ -94,7 +94,7 @@ optimizer: springProfile: prod image: repository: cloudhealth/cloudhealth-optimizer-agent - tag: "1.0.0-19" + tag: "1.0.0-20" # Set to automatically create secret, or create a secret with the name specified by the 'secretName' parameter chapiKey: "" resources: From 23f17f9e55e1459c4679585976de99fc61830a1d Mon Sep 17 00:00:00 2001 From: Katie Hooley Date: Tue, 28 May 2024 15:11:20 -0400 Subject: [PATCH 61/63] [SDO-2961] Update controller dependency to JFrog repo (#120) * update repo * code comment --- charts/cloudhealth-collector/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cloudhealth-collector/Chart.yaml b/charts/cloudhealth-collector/Chart.yaml index c55c53e..3593e20 100644 --- a/charts/cloudhealth-collector/Chart.yaml +++ b/charts/cloudhealth-collector/Chart.yaml @@ -5,11 +5,11 @@ apiVersion: v2 name: cloudhealth-collector description: A Helm chart for CloudHealth's Kubernetes Collector and Optimizer Agent type: application -version: 5.9.1-beta +version: 6.0.0-beta appVersion: "7.0.0" dependencies: - name: k8s-optimization - repository: oci://projects.registry.vmware.com/kubernetes-optimization + repository: oci://projects.packages.broadcom.com/kubernetes-optimization version: 1.1.1 condition: optimizer.enabled home: https://cloudhealth.vmware.com/ From 92790c676319b1b6051a10327eeefe27486eb3a5 Mon Sep 17 00:00:00 2001 From: Katie Hooley Date: Tue, 4 Jun 2024 18:17:46 +0000 Subject: [PATCH 62/63] set branch releases as not latest --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4494be0..30e7054 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,6 @@ name: Release Charts on: push: branches: - - main - gmudumbai/sdo-2649-k8s-optimizer jobs: @@ -24,5 +23,7 @@ jobs: git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - name: Run chart-releaser uses: helm/chart-releaser-action@v1.5.0 + with: + mark_as_latest: false env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file From a08a3b4939ead66939eae15fb900a970f3e73cc1 Mon Sep 17 00:00:00 2001 From: Katie Hooley Date: Tue, 4 Jun 2024 18:23:51 +0000 Subject: [PATCH 63/63] update releaser version --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30e7054..0057eb8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: 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.5.0 + uses: helm/chart-releaser-action@v1.6.0 with: mark_as_latest: false env: