From 0bf6dc7d56b9f72e0ce3f64c1b762299298580e7 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 12 Aug 2024 17:53:13 +0000 Subject: [PATCH] Update perfectscale-autoscaler chart with new package version v1.0.4 --- ...g-cost-saving-performance-improvement.yaml | 26 +++++++++ .../examples/cluster-config-cost-saving.yaml | 26 +++++++++ .../examples/namespace-config-exclusion.yaml | 8 +++ .../examples/namespace-config-override.yaml | 51 ++++++++++++++++++ .../examples/workload-config-exclusion.yaml | 11 ++++ .../workload-config-override-container.yaml | 38 +++++++++++++ .../examples/workload-config-override.yaml | 52 ++++++++++++++++++ charts/psc-autoscaler/templates/NOTES.txt | 3 ++ .../psc-autoscaler/templates/admission.yaml | 7 ++- .../templates/clusterautomationconfig.yaml | 6 --- charts/psc-autoscaler/values.yaml | 54 +------------------ 11 files changed, 223 insertions(+), 59 deletions(-) create mode 100644 charts/psc-autoscaler/examples/cluster-config-cost-saving-performance-improvement.yaml create mode 100644 charts/psc-autoscaler/examples/cluster-config-cost-saving.yaml create mode 100644 charts/psc-autoscaler/examples/namespace-config-exclusion.yaml create mode 100644 charts/psc-autoscaler/examples/namespace-config-override.yaml create mode 100644 charts/psc-autoscaler/examples/workload-config-exclusion.yaml create mode 100644 charts/psc-autoscaler/examples/workload-config-override-container.yaml create mode 100644 charts/psc-autoscaler/examples/workload-config-override.yaml delete mode 100644 charts/psc-autoscaler/templates/clusterautomationconfig.yaml diff --git a/charts/psc-autoscaler/examples/cluster-config-cost-saving-performance-improvement.yaml b/charts/psc-autoscaler/examples/cluster-config-cost-saving-performance-improvement.yaml new file mode 100644 index 0000000..8f89b36 --- /dev/null +++ b/charts/psc-autoscaler/examples/cluster-config-cost-saving-performance-improvement.yaml @@ -0,0 +1,26 @@ +apiVersion: perfectscale.io/v1 +kind: ClusterAutomationConfig +metadata: + name: cluster-automation-config +spec: + automation: + operational: + stopAllAutomation: false + workloadTypes: + Deployment: + operational: + automationMode: "Enabled" + restrictions: + cpuManagement: + request: + increaseEnabled: true + decreaseEnabled: true + limit: + keepLimit: false + memoryManagement: + request: + increaseEnabled: true + decreaseEnabled: true + limit: + increaseEnabled: true + decreaseEnabled: true \ No newline at end of file diff --git a/charts/psc-autoscaler/examples/cluster-config-cost-saving.yaml b/charts/psc-autoscaler/examples/cluster-config-cost-saving.yaml new file mode 100644 index 0000000..0b25ab9 --- /dev/null +++ b/charts/psc-autoscaler/examples/cluster-config-cost-saving.yaml @@ -0,0 +1,26 @@ +apiVersion: perfectscale.io/v1 +kind: ClusterAutomationConfig +metadata: + name: cluster-automation-config +spec: + automation: + operational: + stopAllAutomation: false + workloadTypes: + Deployment: + operational: + automationMode: "Enabled" + restrictions: + cpuManagement: + request: + increaseEnabled: false + decreaseEnabled: true + limit: + keepLimit: true + memoryManagement: + request: + increaseEnabled: false + decreaseEnabled: true + limit: + increaseEnabled: false + decreaseEnabled: false \ No newline at end of file diff --git a/charts/psc-autoscaler/examples/namespace-config-exclusion.yaml b/charts/psc-autoscaler/examples/namespace-config-exclusion.yaml new file mode 100644 index 0000000..cbb4bef --- /dev/null +++ b/charts/psc-autoscaler/examples/namespace-config-exclusion.yaml @@ -0,0 +1,8 @@ +apiVersion: perfectscale.io/v1 +kind: NamespaceAutomationConfig +metadata: + name: your-namespace-automation-config +spec: + automation: + operational: + automationMode: "Disabled" \ No newline at end of file diff --git a/charts/psc-autoscaler/examples/namespace-config-override.yaml b/charts/psc-autoscaler/examples/namespace-config-override.yaml new file mode 100644 index 0000000..d938d75 --- /dev/null +++ b/charts/psc-autoscaler/examples/namespace-config-override.yaml @@ -0,0 +1,51 @@ +apiVersion: perfectscale.io/v1 +kind: NamespaceAutomationConfig +metadata: + name: your-namespace-automation-config +spec: + automation: + workloadTypes: + Deployment: + operational: + automationMode: "Enabled" + timeConstraints: + maxAutomationFrequency: "15m" + maintenanceWindow: + monday: + - "10:00-18:00" + tuesday: + - "10:00-18:00" + wednesday: + - "10:00-18:00" + thursday: + - "10:00-18:00" + friday: + - "10:00-18:00" + saturday: + - "10:00-18:00" + sunday: + - "10:00-18:00" + restrictions: + cpuManagement: + request: + increaseEnabled: true + decreaseEnabled: true + minimumCores: 0.5 + maximumCores: 8 + limit: + keepLimit: false + memoryManagement: + request: + increaseEnabled: true + decreaseEnabled: true + minimumGiB: 1 + maximumGiB: 16 + limit: + increaseEnabled: true + decreaseEnabled: true + minimumGiB: 2 + maximumGiB: 31 + memoryLeakDetection: + maxMemoryIncreaseIterations: + daily: 4 + weekly: 7 \ No newline at end of file diff --git a/charts/psc-autoscaler/examples/workload-config-exclusion.yaml b/charts/psc-autoscaler/examples/workload-config-exclusion.yaml new file mode 100644 index 0000000..c99166d --- /dev/null +++ b/charts/psc-autoscaler/examples/workload-config-exclusion.yaml @@ -0,0 +1,11 @@ +apiVersion: perfectscale.io/v1 +kind: WorkloadAutomationConfig +metadata: + name: your-workload-automation-config +spec: + targetRef: + kind: Deployment + name: deployment-name + automation: + operational: + automationMode: "Disabled" \ No newline at end of file diff --git a/charts/psc-autoscaler/examples/workload-config-override-container.yaml b/charts/psc-autoscaler/examples/workload-config-override-container.yaml new file mode 100644 index 0000000..90b8b46 --- /dev/null +++ b/charts/psc-autoscaler/examples/workload-config-override-container.yaml @@ -0,0 +1,38 @@ +apiVersion: perfectscale.io/v1 +kind: WorkloadAutomationConfig +metadata: + name: your-workload-automation-config +spec: + targetRef: + kind: Deployment + name: deployment-name + automation: + operational: + automationMode: "Enabled" + containers: + container-name: + operational: + restrictions: + cpuManagement: + request: + increaseEnabled: true + decreaseEnabled: true + minimumCores: 0.5 + maximumCores: 8 + limit: + keepLimit: false + memoryManagement: + request: + increaseEnabled: true + decreaseEnabled: true + minimumGiB: 1 + maximumGiB: 16 + limit: + increaseEnabled: true + decreaseEnabled: true + minimumGiB: 2 + maximumGiB: 31 + memoryLeakDetection: + maxMemoryIncreaseIterations: + daily: 4 + weekly: 7 \ No newline at end of file diff --git a/charts/psc-autoscaler/examples/workload-config-override.yaml b/charts/psc-autoscaler/examples/workload-config-override.yaml new file mode 100644 index 0000000..860fd18 --- /dev/null +++ b/charts/psc-autoscaler/examples/workload-config-override.yaml @@ -0,0 +1,52 @@ +apiVersion: perfectscale.io/v1 +kind: WorkloadAutomationConfig +metadata: + name: your-workload-automation-config +spec: + targetRef: + kind: Deployment + name: deployment-name + automation: + operational: + automationMode: "Enabled" + timeConstraints: + maxAutomationFrequency: "15m" + maintenanceWindow: + monday: + - "10:00-18:00" + tuesday: + - "10:00-18:00" + wednesday: + - "10:00-18:00" + thursday: + - "10:00-18:00" + friday: + - "10:00-18:00" + saturday: + - "10:00-18:00" + sunday: + - "10:00-18:00" + restrictions: + cpuManagement: + request: + increaseEnabled: true + decreaseEnabled: true + minimumCores: 0.5 + maximumCores: 8 + limit: + keepLimit: false + memoryManagement: + request: + increaseEnabled: true + decreaseEnabled: true + minimumGiB: 1 + maximumGiB: 16 + limit: + increaseEnabled: true + decreaseEnabled: true + minimumGiB: 2 + maximumGiB: 31 + memoryLeakDetection: + maxMemoryIncreaseIterations: + daily: 4 + weekly: 7 \ No newline at end of file diff --git a/charts/psc-autoscaler/templates/NOTES.txt b/charts/psc-autoscaler/templates/NOTES.txt index 2279276..1585201 100644 --- a/charts/psc-autoscaler/templates/NOTES.txt +++ b/charts/psc-autoscaler/templates/NOTES.txt @@ -14,3 +14,6 @@ echo "Visit http://127.0.0.1:8443 to use your application" kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8443:$CONTAINER_PORT {{- end }} + +2. To view Automation CRD Examples, visit: +{{ .Values.settings.automationCRDExamplesUrl }} diff --git a/charts/psc-autoscaler/templates/admission.yaml b/charts/psc-autoscaler/templates/admission.yaml index 6ee46f4..6f3795a 100644 --- a/charts/psc-autoscaler/templates/admission.yaml +++ b/charts/psc-autoscaler/templates/admission.yaml @@ -49,6 +49,11 @@ metadata: webhooks: - name: configs.perfectscale.io rules: + - apiGroups: [ "perfectscale.io" ] + apiVersions: [ "v1" ] + operations: [ "CREATE", "UPDATE" ] + resources: [ "clusterautomationconfigs" ] + scope: "*" - apiGroups: [ "perfectscale.io" ] apiVersions: [ "v1" ] operations: [ "CREATE", "UPDATE" ] @@ -64,4 +69,4 @@ webhooks: admissionReviewVersions: [ "v1" ] sideEffects: None timeoutSeconds: {{ (.Values.admission).timeout | default 15 }} - failurePolicy: "Fail" \ No newline at end of file + failurePolicy: "Fail" diff --git a/charts/psc-autoscaler/templates/clusterautomationconfig.yaml b/charts/psc-autoscaler/templates/clusterautomationconfig.yaml deleted file mode 100644 index 2ac664f..0000000 --- a/charts/psc-autoscaler/templates/clusterautomationconfig.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: perfectscale.io/v1 -kind: ClusterAutomationConfig -metadata: - name: cluster-automation-config -spec: - {{- toYaml .Values.clusterAutomationConfig | nindent 2 }} diff --git a/charts/psc-autoscaler/values.yaml b/charts/psc-autoscaler/values.yaml index b1b0945..994625a 100644 --- a/charts/psc-autoscaler/values.yaml +++ b/charts/psc-autoscaler/values.yaml @@ -2,11 +2,12 @@ replicaCount: 3 image: repository: public.ecr.aws/perfectscale-io/psc-autoscaler pullPolicy: Always - tag: "v1.0.3" + tag: "v1.0.4" settings: port: 8443 env: "prod" logLevel: "DEBUG" + automationCRDExamplesUrl: "https://github.com/perfectscale-io/perfectscale-io.github.io/tree/main/charts/psc-autoscaler/examples" psUrl: "https://api.app.perfectscale.io" telemetryUrl: "https://api.app.perfectscale.io/psc-telemetry" pushTelemetryFrequency: "1m" @@ -119,54 +120,3 @@ integrationTests: requests: cpu: 100m memory: 100Mi -# Cluster automation configuration -clusterAutomationConfig: - automation: - workloadTypes: - Deployment: - operational: - automationMode: "Enabled" - operational: - stopAllAutomation: true - timeConstraints: - maxAutomationFrequency: "30m" - maintenanceWindow: - monday: - - "00:00-23:59" - tuesday: - - "00:00-23:59" - wednesday: - - "00:00-23:59" - thursday: - - "00:00-23:59" - friday: - - "00:00-23:59" - saturday: - - "00:00-23:59" - sunday: - - "00:00-23:59" - restrictions: - workloadMinWasteUSDPerMonth: 5 - cpuManagement: - request: - increaseEnabled: false - decreaseEnabled: true - minimumCores: -1 - maximumCores: -1 - limit: - keepLimit: true - memoryManagement: - request: - increaseEnabled: false - decreaseEnabled: true - minimumGiB: -1 - maximumGiB: -1 - limit: - increaseEnabled: false - decreaseEnabled: false - minimumGiB: -1 - maximumGiB: -1 - memoryLeakDetection: - maxMemoryIncreaseIterations: - daily: 3 - weekly: 6