From 1cab9994243cb3d3a13e0cc5071bcf8ab10d785a Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Mon, 2 Dec 2024 15:35:31 -0800 Subject: [PATCH] Bump Unfurlbot to version 0.3.2 Reorganize `values.yaml` somewhat to match the current starter and remove the obsolete (unused) autoscaling configuration. If we later want to autoscale this service, we'll need to write a new configuration for the current API version anyway. Add labels to a few Kubernetes resources that didn't have them. --- applications/unfurlbot/Chart.yaml | 2 +- applications/unfurlbot/README.md | 6 +--- applications/unfurlbot/secrets.yaml | 3 +- .../unfurlbot/templates/deployment.yaml | 2 -- applications/unfurlbot/templates/hpa.yaml | 28 ------------------- .../unfurlbot/templates/kafkaaccess.yaml | 18 ++++++------ .../unfurlbot/templates/networkpolicy.yaml | 2 ++ applications/unfurlbot/values.yaml | 26 ++++------------- 8 files changed, 22 insertions(+), 65 deletions(-) delete mode 100644 applications/unfurlbot/templates/hpa.yaml diff --git a/applications/unfurlbot/Chart.yaml b/applications/unfurlbot/Chart.yaml index 9f739e437f..f6421a6498 100644 --- a/applications/unfurlbot/Chart.yaml +++ b/applications/unfurlbot/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: "0.3.1" +appVersion: "0.3.2" description: Squarebot backend that unfurls Jira issues. name: unfurlbot sources: diff --git a/applications/unfurlbot/README.md b/applications/unfurlbot/README.md index 4d615367d9..fb494f08bb 100644 --- a/applications/unfurlbot/README.md +++ b/applications/unfurlbot/README.md @@ -11,10 +11,6 @@ Squarebot backend that unfurls Jira issues. | Key | Type | Default | Description | |-----|------|---------|-------------| | affinity | object | `{}` | Affinity rules for the unfurlbot deployment pod | -| autoscaling.enabled | bool | `false` | Enable autoscaling of unfurlbot deployment | -| autoscaling.maxReplicas | int | `100` | Maximum number of unfurlbot deployment pods | -| autoscaling.minReplicas | int | `1` | Minimum number of unfurlbot deployment pods | -| autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU utilization of unfurlbot deployment pods | | config.jiraProjects | string | See `values.yaml` | Names of Jira projects to unfurl (comma-separated) | | config.jiraUrl | string | `"https://rubinobs.atlassian.net/"` | Jira base URL | | config.logLevel | string | `"INFO"` | Logging level: "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL" | @@ -29,7 +25,7 @@ Squarebot backend that unfurls Jira issues. | global.vaultSecretsPath | string | Set by Argo CD | Base path for Vault secrets | | image.pullPolicy | string | `"IfNotPresent"` | Pull policy for the unfurlbot image | | image.repository | string | `"ghcr.io/lsst-sqre/unfurlbot"` | Image to use in the unfurlbot deployment | -| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. | +| image.tag | string | The appVersion of the chart | Image tag to use | | ingress.annotations | object | `{}` | Additional annotations for the ingress rule | | nodeSelector | object | `{}` | Node selection rules for the unfurlbot deployment pod | | podAnnotations | object | `{}` | Annotations for the unfurlbot deployment pod | diff --git a/applications/unfurlbot/secrets.yaml b/applications/unfurlbot/secrets.yaml index 1ccca0b2c9..da469635b6 100644 --- a/applications/unfurlbot/secrets.yaml +++ b/applications/unfurlbot/secrets.yaml @@ -20,7 +20,8 @@ UNFURLBOT_SLACK_APP_ID: key: SQUAREBOT_SLACK_APP_ID UNFURLBOT_SLACK_TOKEN: description: >- - The Slack bot user oauth token for the Slack App shared by all Squarebot services. + The Slack bot user OAuth token for the Slack App shared by all Squarebot + services. copy: application: squarebot key: SQUAREBOT_SLACK_TOKEN diff --git a/applications/unfurlbot/templates/deployment.yaml b/applications/unfurlbot/templates/deployment.yaml index e511d62527..018fbb3c7f 100644 --- a/applications/unfurlbot/templates/deployment.yaml +++ b/applications/unfurlbot/templates/deployment.yaml @@ -7,9 +7,7 @@ metadata: app.kubernetes.io/component: "server" app.kubernetes.io/part-of: "unfurlbot" spec: - {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} - {{- end }} selector: matchLabels: {{- include "unfurlbot.selectorLabels" . | nindent 6 }} diff --git a/applications/unfurlbot/templates/hpa.yaml b/applications/unfurlbot/templates/hpa.yaml deleted file mode 100644 index 01f98ad397..0000000000 --- a/applications/unfurlbot/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: "unfurlbot" - labels: - {{- include "unfurlbot.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: "unfurlbot" - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: "cpu" - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: "memory" - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/applications/unfurlbot/templates/kafkaaccess.yaml b/applications/unfurlbot/templates/kafkaaccess.yaml index 0c1db33801..322ad17ed6 100644 --- a/applications/unfurlbot/templates/kafkaaccess.yaml +++ b/applications/unfurlbot/templates/kafkaaccess.yaml @@ -1,14 +1,16 @@ apiVersion: access.strimzi.io/v1alpha1 kind: KafkaAccess metadata: - name: unfurlbot-kafka + name: "unfurlbot-kafka" + labels: + {{- include "unfurlbot.labels" . | nindent 4 }} spec: kafka: - name: sasquatch - namespace: sasquatch - listener: tls + name: "sasquatch" + namespace: "sasquatch" + listener: "tls" user: - kind: KafkaUser - apiGroup: kafka.strimzi.io - name: unfurlbot - namespace: sasquatch + kind: "KafkaUser" + apiGroup: "kafka.strimzi.io" + name: "unfurlbot" + namespace: "sasquatch" diff --git a/applications/unfurlbot/templates/networkpolicy.yaml b/applications/unfurlbot/templates/networkpolicy.yaml index 914cd78765..bfb84dd0b2 100644 --- a/applications/unfurlbot/templates/networkpolicy.yaml +++ b/applications/unfurlbot/templates/networkpolicy.yaml @@ -2,6 +2,8 @@ apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: "unfurlbot" + labels: + {{- include "unfurlbot.labels" . | nindent 4 }} spec: podSelector: matchLabels: diff --git a/applications/unfurlbot/values.yaml b/applications/unfurlbot/values.yaml index d27c557272..cb997a6f8e 100644 --- a/applications/unfurlbot/values.yaml +++ b/applications/unfurlbot/values.yaml @@ -12,7 +12,8 @@ image: # -- Pull policy for the unfurlbot image pullPolicy: "IfNotPresent" - # -- Overrides the image tag whose default is the chart appVersion. + # -- Image tag to use + # @default -- The appVersion of the chart tag: "" config: @@ -103,7 +104,6 @@ ingress: annotations: {} redis: - # -- Resource requests and limits for the redis pod # @default -- see `values.yaml` resources: @@ -114,19 +114,11 @@ redis: cpu: "2m" memory: "3Mi" -autoscaling: - # -- Enable autoscaling of unfurlbot deployment - enabled: false - - # -- Minimum number of unfurlbot deployment pods - minReplicas: 1 - - # -- Maximum number of unfurlbot deployment pods - maxReplicas: 100 +# -- Affinity rules for the unfurlbot deployment pod +affinity: {} - # -- Target CPU utilization of unfurlbot deployment pods - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 +# -- Node selection rules for the unfurlbot deployment pod +nodeSelector: {} # -- Annotations for the unfurlbot deployment pod podAnnotations: {} @@ -141,15 +133,9 @@ resources: cpu: "9m" memory: "60Mi" -# -- Node selection rules for the unfurlbot deployment pod -nodeSelector: {} - # -- Tolerations for the unfurlbot deployment pod tolerations: [] -# -- Affinity rules for the unfurlbot deployment pod -affinity: {} - # The following will be set by parameters injected by Argo CD and should not # be set in the individual environment values files. global: