Skip to content

Commit

Permalink
feat: remove hpa, autoscaling
Browse files Browse the repository at this point in the history
  • Loading branch information
soniqua committed Jul 10, 2024
1 parent 2d47ef8 commit ea4599f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 190 deletions.
2 changes: 1 addition & 1 deletion charts/snyk-broker/templates/broker_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
{{- include "snyk-broker.labels" . }}
spec:
{{- if and (not .Values.autoscaling.enabled) (.Values.highAvailabilityMode.enabled) }}
{{- if .Values.highAvailabilityMode.enabled }}
replicas: {{ .Values.replicaCount }}
{{ else }}
replicas: 1
Expand Down
33 changes: 0 additions & 33 deletions charts/snyk-broker/templates/broker_hpa.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions charts/snyk-broker/templates/cra_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ metadata:
app.kubernetes.io/name: {{ .Release.Name }}-cr{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: 1
{{- end }}
selector:
matchLabels:
app.kubernetes.io/name: {{ .Release.Name }}-cr{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }}
Expand Down
78 changes: 0 additions & 78 deletions charts/snyk-broker/tests/broker_autoscaling_test.yaml

This file was deleted.

57 changes: 0 additions & 57 deletions charts/snyk-broker/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,63 +458,6 @@
},
"extraPodSpecsCr":{
"nullable": true
},
"autoscaling": {
"type": "object",
"additionalProperties": false,
"properties":{
"enabled": {
"type": "boolean"
},
"minReplicas": {
"type": "integer",
"minimum": 2,
"maximum": 4
},
"maxReplicas": {
"type": "integer",
"minimum": 2,
"maximum": 4
},
"cpu":{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"Utilization",
"AverageValue"
]
},
"value": {
"type": ["integer","string"]
},
"enabled": {
"type": "boolean"
}
}
},
"memory": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"Utilization",
"AverageValue"
]
},
"value": {
"type": ["integer","string"]
},
"enabled": {
"type": "boolean"
}
}
}
}
}
},
"additionalProperties": true
Expand Down
28 changes: 9 additions & 19 deletions charts/snyk-broker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,21 @@ brokerToken: ""
# Ex: http://kubernetes-ingress.domain.com:8000
brokerClientUrl: ""

# Do not touch unless directed by a Snyk Representative
# See https://docs.snyk.io/working-with-snyk/regional-hosting-and-data-residency#broker-urls for regional endpoints
# Default endpoints are for the Snyk US tenant.
brokerServerUrl: "https://broker.snyk.io"

brokerDispatcherUrl: "https://api.snyk.io"

preflightChecks:
enabled: true

# The Broker is designed to work with multiple replicas (min 2, max 4) with High Availability mode enabled.

highAvailabilityMode:
enabled: false
brokerDispatcherUrl: "https://api.snyk.io"

# This number if only used if enableHighAvailabilityMode is true
# This number is only used if highAvailabilityMode.enabled is true
replicaCount: 2

# Adds additional labels to broker deployment
Expand All @@ -34,7 +38,8 @@ labels: {}
# Allowed values for scmType:
# GitHub.com: github-com
# GitHub Enterprise: github-enterprise
# Bitbucket: bitbucket-server
# Bitbucket Server: bitbucket-server
# Bitbucket Server with Bearer Auth: bitbucket-server-bearer-auth
# GitLab: gitlab
# Azure Repos: azure-repos
# Artifactory: artifactory
Expand Down Expand Up @@ -431,18 +436,3 @@ extraPodSpecs:

extraPodSpecsCr:
# As above, for Container Registry Agent

##### The Broker is designed to work with multiple replicas (min 2, max 4) only with High Availability mode enabled.

autoscaling:
enabled: false
minReplicas: 2
maxReplicas: 4
cpu:
type: "Utilization"
value: 80
enabled: true
memory:
type: "Utilization"
value: 80
enabled: false

0 comments on commit ea4599f

Please sign in to comment.