Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating helm chart #130

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions chart/watermarkpodautoscaler/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# WatermarkPodAutoscaler Helm chart changelog

## v0.4

### Breaking changes

* Support new CLI flags (workers, enabling profiling)
* New options for the controller (ReadinessDelaySeconds)

## v0.3

### Breaking changes
Expand Down
2 changes: 1 addition & 1 deletion chart/watermarkpodautoscaler/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: v0.3.1
description: Watermark Pod Autoscaler
name: watermarkpodautoscaler
version: v0.3.0
version: v0.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ metadata:
name: watermarkpodautoscalers.datadoghq.com
spec:
additionalPrinterColumns:
- JSONPath: .status.conditions[0].type
name: condition
type: string
- JSONPath: .status.conditions[0].status
name: condition status
type: string
Comment on lines +10 to +15
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can we be sure it is always the first item in the conditions slice?

- JSONPath: .status.currentMetrics[*].external.currentValue..
name: value
type: string
Expand All @@ -25,9 +31,12 @@ spec:
- JSONPath: .spec.maxReplicas
name: max replicas
type: integer
- JSONPath: .spec.dryRun
- JSONPath: .status.conditions[?(@.type=="DryRun")].status
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I was talking about during the standup.

name: dry-run
type: string
- JSONPath: .status.lastScaleTime
name: last scale
type: date
group: datadoghq.com
names:
kind: WatermarkPodAutoscaler
Expand Down Expand Up @@ -230,6 +239,13 @@ spec:
- type
type: object
type: array
minAvailableReplicaPercentage:
description: MinAvailableReplicaPercentage indicates the minimum percentage
of replicas that need to be available in order for the controller
to autoscale the target.
format: int32
maximum: 100
type: integer
minReplicas:
format: int32
minimum: 1
Expand Down
10 changes: 10 additions & 0 deletions chart/watermarkpodautoscaler/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ spec:
args:
- --loglevel={{ .Values.logLevel }}
- --leader-election-resource={{ .Values.leaderElectionResourceLock }}
{{- if .Values.ddProfiling.enabled }}
- -ddProfilingEnabled
{{- end }}
- -workers={{ .Values.workers }}
env:
- name: WATCH_NAMESPACE
{{- if .Values.watchAllNamespaces }}
Expand All @@ -57,6 +61,12 @@ spec:
fieldRef:
fieldPath: metadata.namespace
{{- end }}
{{- if .Values.ddProfiling.enabled }}
- name: DD_AGENT_HOST
valueFrom:
fieldRef:
fieldPath: status.hostIP
{{- end }}
- name: POD_NAME
valueFrom:
fieldRef:
Expand Down
7 changes: 6 additions & 1 deletion chart/watermarkpodautoscaler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1
image:
repository: gcr.io/datadoghq/watermarkpodautoscaler
tag: v0.3.1
tag: v0.4.0
pullPolicy: IfNotPresent
imagePullSecrets: []
nameOverride: ""
Expand All @@ -29,6 +29,11 @@ labelsAsTags: []
podSecurityContext: {}
# fsGroup: 2000

ddProfiling:
enabled: false

workers: 1
Copy link
Collaborator

@clamoriniere clamoriniere Feb 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO to be backward compatible the workers value should be empty. because here you will always add the new args that doesn't exist on previous version.

OR, you add an if in the template file. Something like

            {{- if no eq (int .Values.workers) 1 }}
             - -workers={{ .Values.workers }}
            {{- end }}     


# Determines which resource lock to use for leader election
leaderElectionResourceLock: configmaps
securityContext: {}
Expand Down