From 940a96821a74e251e196b5200b9c3b16b1136ec4 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Wed, 10 Jul 2024 12:53:51 -0400 Subject: [PATCH 1/9] add 2.4.0 template versions --- .../launcher-templates/default/2.4.0/job.tpl | 219 +++++++++++++ .../default/2.4.0/service.tpl | 38 +++ .../launcher-templates/helm/2.4.0-v1/job.tpl | 291 ++++++++++++++++++ .../helm/2.4.0-v1/service.tpl | 51 +++ 4 files changed, 599 insertions(+) create mode 100644 examples/launcher-templates/default/2.4.0/job.tpl create mode 100644 examples/launcher-templates/default/2.4.0/service.tpl create mode 100644 examples/launcher-templates/helm/2.4.0-v1/job.tpl create mode 100644 examples/launcher-templates/helm/2.4.0-v1/service.tpl diff --git a/examples/launcher-templates/default/2.4.0/job.tpl b/examples/launcher-templates/default/2.4.0/job.tpl new file mode 100644 index 00000000..9f7350d1 --- /dev/null +++ b/examples/launcher-templates/default/2.4.0/job.tpl @@ -0,0 +1,219 @@ +# Version: 2.4.0 +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + {{- with .Job.metadata.job.annotations }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 4 | trimPrefix (repeat 4 " ") }} + {{- end }} + {{- end }} + labels: + app.kubernetes.io/managed-by: "launcher" + {{- with .Job.instanceId }} + launcher-instance-id: {{ toYaml . }} + {{- end }} + {{- with .Job.metadata.job.labels }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 4 | trimPrefix (repeat 4 " ") }} + {{- end }} + {{- end }} + generateName: {{ toYaml .Job.generateName }} +spec: + backoffLimit: 0 + template: + metadata: + annotations: + {{- if .Job.tags }} + {{- $i := 0 }} + {{- range .Job.tags }} + USER_TAG_{{ $i }}: {{ toYaml . | indent 8 | trimPrefix (repeat 8 " ") }} + {{- $i = add $i 1 }} + {{- end }} + {{- end }} + stdin: {{ toYaml .Job.stdin | indent 8 | trimPrefix (repeat 8 " ") }} + user: {{ toYaml .Job.user }} + name: {{ toYaml .Job.name }} + service_ports: {{ toYaml .Job.servicePortsJson }} + {{- if .Job.metadata }} + user_metadata: {{ toJson .Job.metadata | toYaml | indent 8 | trimPrefix (repeat 8 " ") }} + {{- end }} + {{- with .Job.metadata.pod.annotations }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 8 | trimPrefix (repeat 8 " ") }} + {{- end }} + {{- end }} + labels: + {{- with .Job.instanceId }} + launcher-instance-id: {{ toYaml . }} + {{- end }} + {{- with .Job.metadata.pod.labels }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 8 | trimPrefix (repeat 8 " ") }} + {{- end }} + {{- end }} + generateName: {{ toYaml .Job.generateName }} + spec: + {{- if .Job.host }} + nodeName: {{ toYaml .Job.host }} + {{- end }} + restartPolicy: Never + shareProcessNamespace: {{ .Job.shareProcessNamespace }} + {{- if ne (len .Job.volumes) 0 }} + volumes: + {{- range .Job.volumes }} + - {{ nindent 10 (toYaml .) | trim -}} + {{- end }} + {{- end }} + {{- if ne (len .Job.placementConstraints) 0 }} + nodeSelector: + {{- range .Job.placementConstraints }} + {{ .name }}: {{ toYaml .value }} + {{- end }} + {{- end }} + {{- $securityContext := dict }} + {{- if .Job.container.runAsUserId }} + {{- $_ := set $securityContext "runAsUser" .Job.container.runAsUserId }} + {{- end }} + {{- if .Job.container.runAsGroupId }} + {{- $_ := set $securityContext "runAsGroup" .Job.container.runAsGroupId }} + {{- end }} + {{- if .Job.container.supplementalGroupIds }} + {{- $groupIds := list }} + {{- range .Job.container.supplementalGroupIds }} + {{- $groupIds = append $groupIds . }} + {{- end }} + {{- $_ := set $securityContext "supplementalGroups" (cat "[" ($groupIds | join ", ") "]") }} + {{- end }} + {{- if $securityContext }} + securityContext: + {{- range $key, $val := $securityContext }} + {{ $key }}: {{ $val }} + {{- end }} + {{- end }} + {{- if .Job.serviceAccountName }} + serviceAccountName: {{ .Job.serviceAccountName | quote }} + {{- end }} + initContainers: + {{- with .Job.metadata.pod.initContainers }} + {{- range . }} + - {{ toYaml . | indent 10 | trimPrefix (repeat 10 " ") }} + {{- end }} + {{- end }} + containers: + - name: rs-launcher-container + image: {{ toYaml .Job.container.image }} + {{- $isShell := false }} + {{- if .Job.command }} + command: ['/bin/sh'] + {{- $isShell = true }} + {{- else }} + command: [{{ toYaml .Job.exe }}] + {{- $isShell = false }} + {{- end }} + {{- if .Job.stdin }} + stdin: true + {{- else }} + stdin: false + {{- end }} + stdinOnce: true + {{- if .Job.workingDirectory }} + workingDir: {{ toYaml .Job.workingDirectory }} + {{- end }} + {{- if or (ne (len .Job.args) 0) $isShell }} + args: + {{- if $isShell }} + - '-c' + {{- if ne (len .Job.args) 0 }} + - {{ .Job.args | join " " | cat .Job.command | toYaml | indent 12 | trimPrefix (repeat 12 " ") }} + {{- else }} + - {{ .Job.command | toYaml | indent 12 | trimPrefix (repeat 12 " ") }} + {{- end }} + {{- else }} + {{- range .Job.args }} + - {{ toYaml . | indent 12 | trimPrefix (repeat 12 " ") }} + {{- end }} + {{- end }} + {{- end }} + {{- $secrets := list }} + {{- range .Job.config }} + {{- if eq .name "secret" }} + {{- $packedSecret := .value }} + {{- $secret := dict }} + {{- $_ := set $secret "secret" (splitList ":" $packedSecret | first) }} + {{- $_ := set $secret "key" (slice (splitList ":" $packedSecret) 1 2 | first) }} + {{- $_ := set $secret "name" (splitList ":" $packedSecret | last) }} + {{- $secrets = append $secrets $secret }} + {{- end }} + {{- end }} + {{- if or (ne (len .Job.environment) 0) (ne (len $secrets) 0) }} + env: + {{- range .Job.environment }} + - name: {{ toYaml .name | indent 14 | trimPrefix (repeat 14 " ") }} + value: {{ toYaml .value | indent 14 | trimPrefix (repeat 14 " ") }} + {{- end }} + {{- range $secrets }} + - name: {{ get . "name"}} + valueFrom: + secretKeyRef: + name: {{ get . "secret" }} + key: {{ get . "key" }} + {{- end }} + {{- end }} + {{- $exposedPorts := list }} + {{- range .Job.exposedPorts }} + {{- if .publishedPort }} + {{- $exposedPorts = append $exposedPorts . }} + {{- end }} + {{- end }} + {{- if ne (len $exposedPorts) 0 }} + ports: + {{- range $exposedPorts }} + - containerPort: {{ .targetPort }} + hostPort: {{ .publishedPort }} + {{- end }} + {{- end }} + {{- $limits := dict }} + {{- $requests := dict }} + {{- range .Job.resourceLimits }} + {{- if eq .type "cpuCount" }} + {{- $_ := set $limits "cpu" .value }} + {{- else if eq .type "CPU Request" }} + {{- $_ := set $requests "cpu" .value }} + {{- else if eq .type "memory" }} + {{- $_ := set $limits "memory" (printf "%s%s" .value "M") }} + {{- else if eq .type "Memory Request" }} + {{- $_ := set $requests "memory" (printf "%s%s" .value "M") }} + {{- else if eq .type "NVIDIA GPUs" }} + {{- $val := float64 .value }} + {{- if ne $val 0.0 }} + {{- $_ := set $limits "nvidia.com/gpu" $val }} + {{- end }} + {{- else if eq .type "AMD GPUs" }} + {{- $val := float64 .value }} + {{- if ne $val 0.0 }} + {{- $_ := set $limits "amd.com/gpu" $val }} + {{- end }} + {{- end }} + {{- end }} + {{- if any (ne (len $requests) 0) (ne (len $limits) 0) }} + resources: + {{- if ne (len $requests) 0 }} + requests: + {{- range $key, $val := $requests }} + {{ $key }}: {{ toYaml $val }} + {{- end }} + {{- end }} + {{- if ne (len $limits) 0 }} + limits: + {{- range $key, $val := $limits }} + {{ $key }}: {{ toYaml $val }} + {{- end }} + {{- end }} + {{- end }} + {{- if ne (len .Job.volumes) 0 }} + volumeMounts: + {{- range .Job.volumeMounts }} + - {{ nindent 14 (toYaml .) | trim -}} + {{- end }} + {{- end }} diff --git a/examples/launcher-templates/default/2.4.0/service.tpl b/examples/launcher-templates/default/2.4.0/service.tpl new file mode 100644 index 00000000..8b851c1c --- /dev/null +++ b/examples/launcher-templates/default/2.4.0/service.tpl @@ -0,0 +1,38 @@ +# Version: 2.4.0 +apiVersion: v1 +kind: Service +metadata: + name: {{ .Job.serviceName }} + annotations: + {{- with .Job.metadata.service.annotations }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 4 | trimPrefix (repeat 4 " ") }} + {{- end }} + {{- end }} + labels: + app.kubernetes.io/managed-by: "launcher" + job-name: {{ toYaml .Job.id }} + {{- with .Job.instanceId }} + launcher-instance-id: {{ toYaml . }} + {{- end }} + {{- with .Job.metadata.service.labels }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 8 | trimPrefix (repeat 8 " ") }} + {{- end }} + {{- end }} +spec: + ports: + {{- $i := 0 }} + {{- range .Job.exposedPorts }} + {{- if not .publishedPort }} + - name: {{ printf "port%d" $i }} + protocol: {{ .protocol }} + port: {{ .targetPort }} + targetPort: {{ .targetPort }} + {{- $i = add $i 1 }} + {{- end }} + {{- end }} + selector: + job-name: {{toYaml .Job.id }} + clusterIP: '' + type: NodePort diff --git a/examples/launcher-templates/helm/2.4.0-v1/job.tpl b/examples/launcher-templates/helm/2.4.0-v1/job.tpl new file mode 100644 index 00000000..f9f6af3b --- /dev/null +++ b/examples/launcher-templates/helm/2.4.0-v1/job.tpl @@ -0,0 +1,291 @@ +# Version: 2.4.0 +# DO NOT MODIFY the "Version: " key +# Helm Version: v1 +{{- $templateData := include "rstudio-library.templates.data" nil | mustFromJson }} +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + {{- with .Job.metadata.job.annotations }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 4 | trimPrefix (repeat 4 " ") }} + {{- end }} + {{- end }} + {{- with $templateData.job.annotations }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 4 | trimPrefix (repeat 4 " ") }} + {{- end }} + {{- end }} + labels: + app.kubernetes.io/managed-by: "launcher" + {{- with .Job.instanceId }} + launcher-instance-id: {{ toYaml . }} + {{- end }} + {{- with .Job.metadata.job.labels }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 4 | trimPrefix (repeat 4 " ") }} + {{- end }} + {{- end }} + {{- with $templateData.job.labels }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 4 | trimPrefix (repeat 4 " ") }} + {{- end }} + {{- end }} + generateName: {{ toYaml .Job.generateName }} +spec: + {{- if $templateData.job.ttlSecondsAfterFinished }} + ttlSecondsAfterFinished: {{ $templateData.job.ttlSecondsAfterFinished }} + {{- end }} + backoffLimit: 0 + template: + metadata: + annotations: + {{- if .Job.tags }} + {{- $i := 0 }} + {{- range .Job.tags }} + USER_TAG_{{ $i }}: {{ toYaml . | indent 8 | trimPrefix (repeat 8 " ") }} + {{- $i = add $i 1 }} + {{- end }} + {{- end }} + stdin: {{ toYaml .Job.stdin | indent 8 | trimPrefix (repeat 8 " ") }} + user: {{ toYaml .Job.user }} + name: {{ toYaml .Job.name }} + service_ports: {{ toYaml .Job.servicePortsJson }} + {{- if .Job.metadata }} + user_metadata: {{ toJson .Job.metadata | toYaml | indent 8 | trimPrefix (repeat 8 " ") }} + {{- end }} + {{- with .Job.metadata.pod.annotations }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 8 | trimPrefix (repeat 8 " ") }} + {{- end }} + {{- end }} + {{- with $templateData.pod.annotations }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 8 | trimPrefix (repeat 8 " ") }} + {{- end }} + {{- end }} + labels: + {{- with .Job.instanceId }} + launcher-instance-id: {{ toYaml . }} + {{- end }} + {{- with .Job.metadata.pod.labels }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 8 | trimPrefix (repeat 8 " ") }} + {{- end }} + {{- end }} + {{- with $templateData.pod.labels }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 8 | trimPrefix (repeat 8 " ") }} + {{- end }} + {{- end }} + generateName: {{ toYaml .Job.generateName }} + spec: + {{- if .Job.host }} + nodeName: {{ toYaml .Job.host }} + {{- end }} + restartPolicy: Never + {{- if or $templateData.pod.serviceAccountName .Job.serviceAccountName }} + serviceAccountName: {{ .Job.serviceAccountName | default $templateData.pod.serviceAccountName | quote }} + {{- end }} + shareProcessNamespace: {{ .Job.shareProcessNamespace }} + {{- if or (ne (len .Job.volumes) 0) (ne (len $templateData.pod.volumes) 0) }} + volumes: + {{- range .Job.volumes }} + - {{ nindent 10 (toYaml .) | trim -}} + {{- end }} + {{- range $templateData.pod.volumes }} + - {{ nindent 10 (toYaml .) | trim -}} + {{- end }} + {{- end }} + {{- with $templateData.pod.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with $templateData.pod.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if or (ne (len .Job.placementConstraints) 0) (ne (len $templateData.pod.nodeSelector) 0) }} + nodeSelector: + {{- range .Job.placementConstraints }} + {{ .name }}: {{ toYaml .value }} + {{- end }} + {{- range $key,$val := $templateData.pod.nodeSelector }} + {{ $key }}: {{- toYaml $val | nindent 10 }} + {{- end }} + {{- end }} + {{- with $templateData.pod.priorityClassName }} + priorityClassName: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- $securityContext := $templateData.pod.defaultSecurityContext }} + {{- if .Job.container.runAsUserId }} + {{- $_ := set $securityContext "runAsUser" .Job.container.runAsUserId }} + {{- end }} + {{- if .Job.container.runAsGroupId }} + {{- $_ := set $securityContext "runAsGroup" .Job.container.runAsGroupId }} + {{- end }} + {{- if .Job.container.supplementalGroupIds }} + {{- $groupIds := list }} + {{- range .Job.container.supplementalGroupIds }} + {{- $groupIds = append $groupIds . }} + {{- end }} + {{- $_ := set $securityContext "supplementalGroups" (cat "[" ($groupIds | join ", ") "]") }} + {{- $securityContext := mergeOverwrite $securityContext $templateData.pod.securityContext }} + {{- end }} + {{- if $securityContext }} + securityContext: + {{- range $key, $val := $securityContext }} + {{ $key }}: {{ $val }} + {{- end }} + {{- end }} + {{- with $templateData.pod.imagePullSecrets }} + imagePullSecrets: {{ toYaml . | nindent 12 }} + {{- end }} + initContainers: + {{- with .Job.metadata.pod.initContainers }} + {{- range . }} + - {{ toYaml . | indent 10 | trimPrefix (repeat 10 " ") }} + {{- end }} + {{- end }} + {{- with $templateData.pod.initContainers }} + {{- range . }} + - {{ toYaml . | indent 10 | trimPrefix (repeat 10 " ") }} + {{- end }} + {{- end }} + containers: + - name: rs-launcher-container + image: {{ toYaml .Job.container.image }} + {{- with $templateData.pod.imagePullPolicy }} + imagePullPolicy: {{- . | nindent 12 }} + {{- end }} + {{- $isShell := false }} + {{- if $templateData.pod.command }} + command: {{- toYaml $templateData.pod.command | nindent 12 }} + {{- if .Job.command }}{{- $isShell = true }}{{- end }} + {{- else if .Job.command }} + command: ['/bin/sh'] + {{- $isShell = true }} + {{- else }} + command: [{{ toYaml .Job.exe }}] + {{- $isShell = false }} + {{- end }} + {{- if .Job.stdin }} + stdin: true + {{- else }} + stdin: false + {{- end }} + stdinOnce: true + {{- if .Job.workingDirectory }} + workingDir: {{ toYaml .Job.workingDirectory }} + {{- end }} + {{- if or (ne (len .Job.args) 0) $isShell }} + args: + {{- if $isShell }} + - '-c' + {{- if ne (len .Job.args) 0 }} + - {{ .Job.args | join " " | cat .Job.command | toYaml | indent 12 | trimPrefix (repeat 12 " ") }} + {{- else }} + - {{ .Job.command | toYaml | indent 12 | trimPrefix (repeat 12 " ") }} + {{- end }} + {{- else }} + {{- range .Job.args }} + - {{ toYaml . | indent 12 | trimPrefix (repeat 12 " ") }} + {{- end }} + {{- end }} + {{- end }} + {{- $secrets := list }} + {{- range .Job.config }} + {{- if eq .name "secret" }} + {{- $packedSecret := .value }} + {{- $secret := dict }} + {{- $_ := set $secret "secret" (splitList ":" $packedSecret | first) }} + {{- $_ := set $secret "key" (slice (splitList ":" $packedSecret) 1 2 | first) }} + {{- $_ := set $secret "name" (splitList ":" $packedSecret | last) }} + {{- $secrets = append $secrets $secret }} + {{- end }} + {{- end }} + {{- if or (ne (len .Job.environment) 0) (ne (len $secrets) 0) (ne (len $templateData.pod.env) 0) }} + env: + {{- range .Job.environment }} + - name: {{ toYaml .name | indent 14 | trimPrefix (repeat 14 " ") }} + value: {{ toYaml .value | indent 14 | trimPrefix (repeat 14 " ") }} + {{- end }} + {{- range $secrets }} + - name: {{ get . "name"}} + valueFrom: + secretKeyRef: + name: {{ get . "secret" }} + key: {{ get . "key" }} + {{- end }} + {{- if $templateData.pod.env }} + {{- toYaml $templateData.pod.env | nindent 12 }} + {{- end }} + {{- end }} + {{- with $templateData.pod.containerSecurityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- $exposedPorts := list }} + {{- range .Job.exposedPorts }} + {{- if .publishedPort }} + {{- $exposedPorts = append $exposedPorts . }} + {{- end }} + {{- end }} + {{- if ne (len $exposedPorts) 0 }} + ports: + {{- range $exposedPorts }} + - containerPort: {{ .targetPort }} + hostPort: {{ .publishedPort }} + {{- end }} + {{- end }} + {{- $limits := dict }} + {{- $requests := dict }} + {{- range .Job.resourceLimits }} + {{- if eq .type "cpuCount" }} + {{- $_ := set $limits "cpu" .value }} + {{- else if eq .type "CPU Request" }} + {{- $_ := set $requests "cpu" .value }} + {{- else if eq .type "memory" }} + {{- $_ := set $limits "memory" (printf "%s%s" .value "M") }} + {{- else if eq .type "Memory Request" }} + {{- $_ := set $requests "memory" (printf "%s%s" .value "M") }} + {{- else if eq .type "NVIDIA GPUs" }} + {{- $val := float64 .value }} + {{- if ne $val 0.0 }} + {{- $_ := set $limits "nvidia.com/gpu" $val }} + {{- end }} + {{- else if eq .type "AMD GPUs" }} + {{- $val := float64 .value }} + {{- if ne $val 0.0 }} + {{- $_ := set $limits "amd.com/gpu" $val }} + {{- end }} + {{- end }} + {{- end }} + {{- if any (ne (len $requests) 0) (ne (len $limits) 0) }} + resources: + {{- if ne (len $requests) 0 }} + requests: + {{- range $key, $val := $requests }} + {{ $key }}: {{ toYaml $val }} + {{- end }} + {{- end }} + {{- if ne (len $limits) 0 }} + limits: + {{- range $key, $val := $limits }} + {{ $key }}: {{ toYaml $val }} + {{- end }} + {{- end }} + {{- end }} + {{- if or (ne (len .Job.volumes) 0) (ne (len $templateData.pod.volumeMounts) 0) }} + volumeMounts: + {{- range .Job.volumeMounts }} + - {{ nindent 14 (toYaml .) | trim -}} + {{- end }} + {{- range $templateData.pod.volumeMounts }} + - {{ nindent 14 (toYaml .) | trim -}} + {{- end }} + {{- end }} + {{- with $templateData.pod.extraContainers }} + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/examples/launcher-templates/helm/2.4.0-v1/service.tpl b/examples/launcher-templates/helm/2.4.0-v1/service.tpl new file mode 100644 index 00000000..30bfca27 --- /dev/null +++ b/examples/launcher-templates/helm/2.4.0-v1/service.tpl @@ -0,0 +1,51 @@ +# Version: 2.4.0 +# DO NOT MODIFY the "Version: " key +# Helm Version: v1 +{{- $templateData := include "rstudio-library.templates.data" nil | mustFromJson }} +apiVersion: v1 +kind: Service +metadata: + name: {{ .Job.serviceName }} + annotations: + {{- with .Job.metadata.service.annotations }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 4 | trimPrefix (repeat 4 " ") }} + {{- end }} + {{- end }} + {{- with $templateData.service.annotations }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 4 | trimPrefix (repeat 4 " ") }} + {{- end }} + {{- end }} + labels: + app.kubernetes.io/managed-by: "launcher" + job-name: {{ toYaml .Job.id }} + {{- with .Job.instanceId }} + launcher-instance-id: {{ toYaml . }} + {{- end }} + {{- with .Job.metadata.service.labels }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 8 | trimPrefix (repeat 8 " ") }} + {{- end }} + {{- end }} + {{- with $templateData.service.labels }} + {{- range $key, $val := . }} + {{ $key }}: {{ toYaml $val | indent 8 | trimPrefix (repeat 8 " ") }} + {{- end }} + {{- end }} +spec: + ports: + {{- $i := 0 }} + {{- range .Job.exposedPorts }} + {{- if not .publishedPort }} + - name: {{ printf "port%d" $i }} + protocol: {{ .protocol }} + port: {{ .targetPort }} + targetPort: {{ .targetPort }} + {{- $i = add $i 1 }} + {{- end }} + {{- end }} + selector: + job-name: {{toYaml .Job.id }} + clusterIP: '' + type: {{ $templateData.service.type }} From b125f0390a66516cdb65696c4379f1e29cec6866 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Wed, 10 Jul 2024 12:54:01 -0400 Subject: [PATCH 2/9] update template versions in the helm charts --- charts/rstudio-connect/files/job.tpl | 13 +++++++++++-- charts/rstudio-connect/files/service.tpl | 7 +++++-- charts/rstudio-workbench/files/job.tpl | 10 ++++++++-- charts/rstudio-workbench/files/service.tpl | 7 +++++-- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/charts/rstudio-connect/files/job.tpl b/charts/rstudio-connect/files/job.tpl index c8279a75..f9f6af3b 100644 --- a/charts/rstudio-connect/files/job.tpl +++ b/charts/rstudio-connect/files/job.tpl @@ -1,6 +1,6 @@ -# Version: 2.3.1 +# Version: 2.4.0 # DO NOT MODIFY the "Version: " key -# Helm Version: v3 +# Helm Version: v1 {{- $templateData := include "rstudio-library.templates.data" nil | mustFromJson }} apiVersion: batch/v1 kind: Job @@ -18,6 +18,9 @@ metadata: {{- end }} labels: app.kubernetes.io/managed-by: "launcher" + {{- with .Job.instanceId }} + launcher-instance-id: {{ toYaml . }} + {{- end }} {{- with .Job.metadata.job.labels }} {{- range $key, $val := . }} {{ $key }}: {{ toYaml $val | indent 4 | trimPrefix (repeat 4 " ") }} @@ -30,6 +33,9 @@ metadata: {{- end }} generateName: {{ toYaml .Job.generateName }} spec: + {{- if $templateData.job.ttlSecondsAfterFinished }} + ttlSecondsAfterFinished: {{ $templateData.job.ttlSecondsAfterFinished }} + {{- end }} backoffLimit: 0 template: metadata: @@ -59,6 +65,9 @@ spec: {{- end }} {{- end }} labels: + {{- with .Job.instanceId }} + launcher-instance-id: {{ toYaml . }} + {{- end }} {{- with .Job.metadata.pod.labels }} {{- range $key, $val := . }} {{ $key }}: {{ toYaml $val | indent 8 | trimPrefix (repeat 8 " ") }} diff --git a/charts/rstudio-connect/files/service.tpl b/charts/rstudio-connect/files/service.tpl index f2b506ae..30bfca27 100644 --- a/charts/rstudio-connect/files/service.tpl +++ b/charts/rstudio-connect/files/service.tpl @@ -1,6 +1,6 @@ -# Version: 2.3.1 +# Version: 2.4.0 # DO NOT MODIFY the "Version: " key -# Helm Version: v3 +# Helm Version: v1 {{- $templateData := include "rstudio-library.templates.data" nil | mustFromJson }} apiVersion: v1 kind: Service @@ -20,6 +20,9 @@ metadata: labels: app.kubernetes.io/managed-by: "launcher" job-name: {{ toYaml .Job.id }} + {{- with .Job.instanceId }} + launcher-instance-id: {{ toYaml . }} + {{- end }} {{- with .Job.metadata.service.labels }} {{- range $key, $val := . }} {{ $key }}: {{ toYaml $val | indent 8 | trimPrefix (repeat 8 " ") }} diff --git a/charts/rstudio-workbench/files/job.tpl b/charts/rstudio-workbench/files/job.tpl index 4288b5a6..f9f6af3b 100644 --- a/charts/rstudio-workbench/files/job.tpl +++ b/charts/rstudio-workbench/files/job.tpl @@ -1,6 +1,6 @@ -# Version: 2.3.1 +# Version: 2.4.0 # DO NOT MODIFY the "Version: " key -# Helm Version: v4 +# Helm Version: v1 {{- $templateData := include "rstudio-library.templates.data" nil | mustFromJson }} apiVersion: batch/v1 kind: Job @@ -18,6 +18,9 @@ metadata: {{- end }} labels: app.kubernetes.io/managed-by: "launcher" + {{- with .Job.instanceId }} + launcher-instance-id: {{ toYaml . }} + {{- end }} {{- with .Job.metadata.job.labels }} {{- range $key, $val := . }} {{ $key }}: {{ toYaml $val | indent 4 | trimPrefix (repeat 4 " ") }} @@ -62,6 +65,9 @@ spec: {{- end }} {{- end }} labels: + {{- with .Job.instanceId }} + launcher-instance-id: {{ toYaml . }} + {{- end }} {{- with .Job.metadata.pod.labels }} {{- range $key, $val := . }} {{ $key }}: {{ toYaml $val | indent 8 | trimPrefix (repeat 8 " ") }} diff --git a/charts/rstudio-workbench/files/service.tpl b/charts/rstudio-workbench/files/service.tpl index 30909985..30bfca27 100644 --- a/charts/rstudio-workbench/files/service.tpl +++ b/charts/rstudio-workbench/files/service.tpl @@ -1,6 +1,6 @@ -# Version: 2.3.1 +# Version: 2.4.0 # DO NOT MODIFY the "Version: " key -# Helm Version: v4 +# Helm Version: v1 {{- $templateData := include "rstudio-library.templates.data" nil | mustFromJson }} apiVersion: v1 kind: Service @@ -20,6 +20,9 @@ metadata: labels: app.kubernetes.io/managed-by: "launcher" job-name: {{ toYaml .Job.id }} + {{- with .Job.instanceId }} + launcher-instance-id: {{ toYaml . }} + {{- end }} {{- with .Job.metadata.service.labels }} {{- range $key, $val := . }} {{ $key }}: {{ toYaml $val | indent 8 | trimPrefix (repeat 8 " ") }} From 2f809973eace779e154d4d51bec71701aba65278 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Wed, 10 Jul 2024 12:54:11 -0400 Subject: [PATCH 3/9] bump versions and generate docs --- charts/rstudio-connect/Chart.yaml | 2 +- charts/rstudio-connect/NEWS.md | 4 ++++ charts/rstudio-connect/README.md | 6 +++--- charts/rstudio-workbench/Chart.yaml | 2 +- charts/rstudio-workbench/NEWS.md | 4 ++++ charts/rstudio-workbench/README.md | 6 +++--- 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/charts/rstudio-connect/Chart.yaml b/charts/rstudio-connect/Chart.yaml index 11c98a2f..a8e0f7ff 100644 --- a/charts/rstudio-connect/Chart.yaml +++ b/charts/rstudio-connect/Chart.yaml @@ -1,6 +1,6 @@ name: rstudio-connect description: Official Helm chart for Posit Connect -version: 0.7.3 +version: 0.7.4 apiVersion: v2 appVersion: 2024.06.0 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png diff --git a/charts/rstudio-connect/NEWS.md b/charts/rstudio-connect/NEWS.md index 6fd52937..45f7eb5c 100644 --- a/charts/rstudio-connect/NEWS.md +++ b/charts/rstudio-connect/NEWS.md @@ -1,3 +1,7 @@ +## 0.7.4 + +- Bump version of launcher templates `job.tpl` and `service.tpl` + # 0.7.3 - Bump Connect version to 2024.06.0 diff --git a/charts/rstudio-connect/README.md b/charts/rstudio-connect/README.md index 78075223..150f764d 100644 --- a/charts/rstudio-connect/README.md +++ b/charts/rstudio-connect/README.md @@ -1,6 +1,6 @@ # Posit Connect -![Version: 0.7.3](https://img.shields.io/badge/Version-0.7.3-informational?style=flat-square) ![AppVersion: 2024.06.0](https://img.shields.io/badge/AppVersion-2024.06.0-informational?style=flat-square) +![Version: 0.7.4](https://img.shields.io/badge/Version-0.7.4-informational?style=flat-square) ![AppVersion: 2024.06.0](https://img.shields.io/badge/AppVersion-2024.06.0-informational?style=flat-square) #### _Official Helm chart for Posit Connect_ @@ -30,11 +30,11 @@ To ensure reproducibility in your environment and insulate yourself from future ## Installing the chart -To install the chart with the release name `my-release` at version 0.7.3: +To install the chart with the release name `my-release` at version 0.7.4: ```{.bash} helm repo add rstudio https://helm.rstudio.com -helm upgrade --install my-release rstudio/rstudio-connect --version=0.7.3 +helm upgrade --install my-release rstudio/rstudio-connect --version=0.7.4 ``` To explore other chart versions, look at: diff --git a/charts/rstudio-workbench/Chart.yaml b/charts/rstudio-workbench/Chart.yaml index 7292ec7b..d5ac6d9c 100644 --- a/charts/rstudio-workbench/Chart.yaml +++ b/charts/rstudio-workbench/Chart.yaml @@ -1,6 +1,6 @@ name: rstudio-workbench description: Official Helm chart for Posit Workbench -version: 0.7.6 +version: 0.7.7 apiVersion: v2 appVersion: 2024.04.2 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png diff --git a/charts/rstudio-workbench/NEWS.md b/charts/rstudio-workbench/NEWS.md index 5897eb5f..6222f967 100644 --- a/charts/rstudio-workbench/NEWS.md +++ b/charts/rstudio-workbench/NEWS.md @@ -1,5 +1,9 @@ # Changelog +## 0.7.7 + +- Bump version of launcher templates `job.tpl` and `service.tpl` + ## 0.7.6 - Bump Workbench version to 2024.04.2 diff --git a/charts/rstudio-workbench/README.md b/charts/rstudio-workbench/README.md index 6398e2f7..002d3a87 100644 --- a/charts/rstudio-workbench/README.md +++ b/charts/rstudio-workbench/README.md @@ -1,6 +1,6 @@ # Posit Workbench -![Version: 0.7.6](https://img.shields.io/badge/Version-0.7.6-informational?style=flat-square) ![AppVersion: 2024.04.2](https://img.shields.io/badge/AppVersion-2024.04.2-informational?style=flat-square) +![Version: 0.7.7](https://img.shields.io/badge/Version-0.7.7-informational?style=flat-square) ![AppVersion: 2024.04.2](https://img.shields.io/badge/AppVersion-2024.04.2-informational?style=flat-square) #### _Official Helm chart for Posit Workbench_ @@ -24,11 +24,11 @@ To ensure a stable production deployment: ## Installing the chart -To install the chart with the release name `my-release` at version 0.7.6: +To install the chart with the release name `my-release` at version 0.7.7: ```{.bash} helm repo add rstudio https://helm.rstudio.com -helm upgrade --install my-release rstudio/rstudio-workbench --version=0.7.6 +helm upgrade --install my-release rstudio/rstudio-workbench --version=0.7.7 ``` To explore other chart versions, look at: From 6563f14979ce1673d9d95c26e5cbbde3b6d4949a Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Tue, 23 Jul 2024 09:51:48 -0400 Subject: [PATCH 4/9] set enableServiceLinks to default false for sessions and fix a templating logic bug Also fix up NEWS.md for the rstudio-connect chart --- charts/rstudio-connect/NEWS.md | 8 +++++--- charts/rstudio-connect/files/job.tpl | 3 ++- charts/rstudio-workbench/NEWS.md | 2 ++ charts/rstudio-workbench/files/job.tpl | 3 ++- examples/launcher-templates/helm/2.4.0-v1/job.tpl | 3 ++- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/charts/rstudio-connect/NEWS.md b/charts/rstudio-connect/NEWS.md index 45f7eb5c..fd1233e9 100644 --- a/charts/rstudio-connect/NEWS.md +++ b/charts/rstudio-connect/NEWS.md @@ -1,13 +1,15 @@ +# Changelog + ## 0.7.4 - Bump version of launcher templates `job.tpl` and `service.tpl` + - `enableServiceLinks` now defaults to `false` for sessions (instead of not being set). + To enable them for sessions, set `launcher.templateValues.enableServiceLinks: true` -# 0.7.3 +## 0.7.3 - Bump Connect version to 2024.06.0 -# Changelog - ## 0.7.2 - Bump Connect version to 2024.05.0 diff --git a/charts/rstudio-connect/files/job.tpl b/charts/rstudio-connect/files/job.tpl index f9f6af3b..a0101a8d 100644 --- a/charts/rstudio-connect/files/job.tpl +++ b/charts/rstudio-connect/files/job.tpl @@ -83,6 +83,7 @@ spec: {{- if .Job.host }} nodeName: {{ toYaml .Job.host }} {{- end }} + enableServiceLinks: {{ if hasKey $templateData.pod "enableServiceLinks" }}{{ $templateData.pod.enableServiceLinks }}{{ else }}false{{ end }} restartPolicy: Never {{- if or $templateData.pod.serviceAccountName .Job.serviceAccountName }} serviceAccountName: {{ .Job.serviceAccountName | default $templateData.pod.serviceAccountName | quote }} @@ -105,7 +106,7 @@ spec: affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- if or (ne (len .Job.placementConstraints) 0) (ne (len $templateData.pod.nodeSelector) 0) }} + {{- if or (ne (len .Job.placementConstraints) 0) (and $templateData.pod.nodeSelector (ne (len $templateData.pod.nodeSelector) 0)) }} nodeSelector: {{- range .Job.placementConstraints }} {{ .name }}: {{ toYaml .value }} diff --git a/charts/rstudio-workbench/NEWS.md b/charts/rstudio-workbench/NEWS.md index 6222f967..cb19d17a 100644 --- a/charts/rstudio-workbench/NEWS.md +++ b/charts/rstudio-workbench/NEWS.md @@ -3,6 +3,8 @@ ## 0.7.7 - Bump version of launcher templates `job.tpl` and `service.tpl` + - `enableServiceLinks` now defaults to `false` for sessions (instead of not being set). + To enable them for sessions, set `launcher.templateValues.enableServiceLinks: true` ## 0.7.6 diff --git a/charts/rstudio-workbench/files/job.tpl b/charts/rstudio-workbench/files/job.tpl index f9f6af3b..a0101a8d 100644 --- a/charts/rstudio-workbench/files/job.tpl +++ b/charts/rstudio-workbench/files/job.tpl @@ -83,6 +83,7 @@ spec: {{- if .Job.host }} nodeName: {{ toYaml .Job.host }} {{- end }} + enableServiceLinks: {{ if hasKey $templateData.pod "enableServiceLinks" }}{{ $templateData.pod.enableServiceLinks }}{{ else }}false{{ end }} restartPolicy: Never {{- if or $templateData.pod.serviceAccountName .Job.serviceAccountName }} serviceAccountName: {{ .Job.serviceAccountName | default $templateData.pod.serviceAccountName | quote }} @@ -105,7 +106,7 @@ spec: affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- if or (ne (len .Job.placementConstraints) 0) (ne (len $templateData.pod.nodeSelector) 0) }} + {{- if or (ne (len .Job.placementConstraints) 0) (and $templateData.pod.nodeSelector (ne (len $templateData.pod.nodeSelector) 0)) }} nodeSelector: {{- range .Job.placementConstraints }} {{ .name }}: {{ toYaml .value }} diff --git a/examples/launcher-templates/helm/2.4.0-v1/job.tpl b/examples/launcher-templates/helm/2.4.0-v1/job.tpl index f9f6af3b..a0101a8d 100644 --- a/examples/launcher-templates/helm/2.4.0-v1/job.tpl +++ b/examples/launcher-templates/helm/2.4.0-v1/job.tpl @@ -83,6 +83,7 @@ spec: {{- if .Job.host }} nodeName: {{ toYaml .Job.host }} {{- end }} + enableServiceLinks: {{ if hasKey $templateData.pod "enableServiceLinks" }}{{ $templateData.pod.enableServiceLinks }}{{ else }}false{{ end }} restartPolicy: Never {{- if or $templateData.pod.serviceAccountName .Job.serviceAccountName }} serviceAccountName: {{ .Job.serviceAccountName | default $templateData.pod.serviceAccountName | quote }} @@ -105,7 +106,7 @@ spec: affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- if or (ne (len .Job.placementConstraints) 0) (ne (len $templateData.pod.nodeSelector) 0) }} + {{- if or (ne (len .Job.placementConstraints) 0) (and $templateData.pod.nodeSelector (ne (len $templateData.pod.nodeSelector) 0)) }} nodeSelector: {{- range .Job.placementConstraints }} {{ .name }}: {{ toYaml .value }} From abcfbf3e40bf57dd145e7019b66323b8b114876e Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Tue, 23 Jul 2024 09:54:51 -0400 Subject: [PATCH 5/9] fix version conflict with Connect --- charts/rstudio-connect/Chart.yaml | 2 +- charts/rstudio-connect/NEWS.md | 6 +++++- charts/rstudio-connect/README.md | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/charts/rstudio-connect/Chart.yaml b/charts/rstudio-connect/Chart.yaml index a8e0f7ff..f49a1d4d 100644 --- a/charts/rstudio-connect/Chart.yaml +++ b/charts/rstudio-connect/Chart.yaml @@ -1,6 +1,6 @@ name: rstudio-connect description: Official Helm chart for Posit Connect -version: 0.7.4 +version: 0.7.5 apiVersion: v2 appVersion: 2024.06.0 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png diff --git a/charts/rstudio-connect/NEWS.md b/charts/rstudio-connect/NEWS.md index fd1233e9..50733ec4 100644 --- a/charts/rstudio-connect/NEWS.md +++ b/charts/rstudio-connect/NEWS.md @@ -1,11 +1,15 @@ # Changelog -## 0.7.4 +## 0.7.5 - Bump version of launcher templates `job.tpl` and `service.tpl` - `enableServiceLinks` now defaults to `false` for sessions (instead of not being set). To enable them for sessions, set `launcher.templateValues.enableServiceLinks: true` +## 0.7.4 + +- Bump default Quarto version to 1.4.557 + ## 0.7.3 - Bump Connect version to 2024.06.0 diff --git a/charts/rstudio-connect/README.md b/charts/rstudio-connect/README.md index 150f764d..6d629df4 100644 --- a/charts/rstudio-connect/README.md +++ b/charts/rstudio-connect/README.md @@ -1,6 +1,6 @@ # Posit Connect -![Version: 0.7.4](https://img.shields.io/badge/Version-0.7.4-informational?style=flat-square) ![AppVersion: 2024.06.0](https://img.shields.io/badge/AppVersion-2024.06.0-informational?style=flat-square) +![Version: 0.7.5](https://img.shields.io/badge/Version-0.7.5-informational?style=flat-square) ![AppVersion: 2024.06.0](https://img.shields.io/badge/AppVersion-2024.06.0-informational?style=flat-square) #### _Official Helm chart for Posit Connect_ @@ -30,11 +30,11 @@ To ensure reproducibility in your environment and insulate yourself from future ## Installing the chart -To install the chart with the release name `my-release` at version 0.7.4: +To install the chart with the release name `my-release` at version 0.7.5: ```{.bash} helm repo add rstudio https://helm.rstudio.com -helm upgrade --install my-release rstudio/rstudio-connect --version=0.7.4 +helm upgrade --install my-release rstudio/rstudio-connect --version=0.7.5 ``` To explore other chart versions, look at: From ec3abe7ddc4c1ba8659af2dac252aaf588f0ddf5 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Tue, 23 Jul 2024 11:31:17 -0400 Subject: [PATCH 6/9] add NEWS link to Kubernetes project discussion --- charts/rstudio-connect/NEWS.md | 3 ++- charts/rstudio-workbench/NEWS.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/rstudio-connect/NEWS.md b/charts/rstudio-connect/NEWS.md index 50733ec4..c620303b 100644 --- a/charts/rstudio-connect/NEWS.md +++ b/charts/rstudio-connect/NEWS.md @@ -4,7 +4,8 @@ - Bump version of launcher templates `job.tpl` and `service.tpl` - `enableServiceLinks` now defaults to `false` for sessions (instead of not being set). - To enable them for sessions, set `launcher.templateValues.enableServiceLinks: true` + To enable them for sessions, set `launcher.templateValues.enableServiceLinks: true`. + - Also see related discussion [on the Kubernetes project](https://github.com/kubernetes/kubernetes/issues/121787) ## 0.7.4 diff --git a/charts/rstudio-workbench/NEWS.md b/charts/rstudio-workbench/NEWS.md index cb19d17a..30ad421a 100644 --- a/charts/rstudio-workbench/NEWS.md +++ b/charts/rstudio-workbench/NEWS.md @@ -5,6 +5,7 @@ - Bump version of launcher templates `job.tpl` and `service.tpl` - `enableServiceLinks` now defaults to `false` for sessions (instead of not being set). To enable them for sessions, set `launcher.templateValues.enableServiceLinks: true` + - Also see related discussion [on the Kubernetes project](https://github.com/kubernetes/kubernetes/issues/121787) ## 0.7.6 From ba502cf3a8c81d756f8a4197bab49708d1599515 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Wed, 25 Sep 2024 14:33:48 -0400 Subject: [PATCH 7/9] bump versions and update docs --- charts/rstudio-connect/Chart.yaml | 2 +- charts/rstudio-connect/NEWS.md | 2 +- charts/rstudio-connect/README.md | 6 +++--- charts/rstudio-pm/NEWS.md | 3 +-- charts/rstudio-workbench/Chart.yaml | 2 +- charts/rstudio-workbench/NEWS.md | 2 +- charts/rstudio-workbench/README.md | 6 +++--- 7 files changed, 11 insertions(+), 12 deletions(-) diff --git a/charts/rstudio-connect/Chart.yaml b/charts/rstudio-connect/Chart.yaml index f346525a..f610631b 100644 --- a/charts/rstudio-connect/Chart.yaml +++ b/charts/rstudio-connect/Chart.yaml @@ -1,6 +1,6 @@ name: rstudio-connect description: Official Helm chart for Posit Connect -version: 0.7.8 +version: 0.7.9 apiVersion: v2 appVersion: 2024.08.0 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png diff --git a/charts/rstudio-connect/NEWS.md b/charts/rstudio-connect/NEWS.md index 9c317318..0b2ef17f 100644 --- a/charts/rstudio-connect/NEWS.md +++ b/charts/rstudio-connect/NEWS.md @@ -1,6 +1,6 @@ # Changelog -## Unversioned +## 0.7.9 - Bump version of launcher templates `job.tpl` and `service.tpl` - `enableServiceLinks` now defaults to `false` for sessions (instead of not being set). diff --git a/charts/rstudio-connect/README.md b/charts/rstudio-connect/README.md index 595ccfce..563c1f04 100644 --- a/charts/rstudio-connect/README.md +++ b/charts/rstudio-connect/README.md @@ -1,6 +1,6 @@ # Posit Connect -![Version: 0.7.8](https://img.shields.io/badge/Version-0.7.8-informational?style=flat-square) ![AppVersion: 2024.08.0](https://img.shields.io/badge/AppVersion-2024.08.0-informational?style=flat-square) +![Version: 0.7.9](https://img.shields.io/badge/Version-0.7.9-informational?style=flat-square) ![AppVersion: 2024.08.0](https://img.shields.io/badge/AppVersion-2024.08.0-informational?style=flat-square) #### _Official Helm chart for Posit Connect_ @@ -30,11 +30,11 @@ To ensure reproducibility in your environment and insulate yourself from future ## Installing the chart -To install the chart with the release name `my-release` at version 0.7.8: +To install the chart with the release name `my-release` at version 0.7.9: ```{.bash} helm repo add rstudio https://helm.rstudio.com -helm upgrade --install my-release rstudio/rstudio-connect --version=0.7.8 +helm upgrade --install my-release rstudio/rstudio-connect --version=0.7.9 ``` To explore other chart versions, look at: diff --git a/charts/rstudio-pm/NEWS.md b/charts/rstudio-pm/NEWS.md index 11e27d21..17395ecf 100644 --- a/charts/rstudio-pm/NEWS.md +++ b/charts/rstudio-pm/NEWS.md @@ -1,6 +1,5 @@ # Changelog - -## Unversioned +## 0.5.33 - Update default Post Package Manager version to 2024.08.2-9 diff --git a/charts/rstudio-workbench/Chart.yaml b/charts/rstudio-workbench/Chart.yaml index a5ac90ab..31c3cff3 100644 --- a/charts/rstudio-workbench/Chart.yaml +++ b/charts/rstudio-workbench/Chart.yaml @@ -1,6 +1,6 @@ name: rstudio-workbench description: Official Helm chart for Posit Workbench -version: 0.8.1 +version: 0.8.2 apiVersion: v2 appVersion: 2024.04.2 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png diff --git a/charts/rstudio-workbench/NEWS.md b/charts/rstudio-workbench/NEWS.md index 45be9675..8581b1b7 100644 --- a/charts/rstudio-workbench/NEWS.md +++ b/charts/rstudio-workbench/NEWS.md @@ -1,6 +1,6 @@ # Changelog -## Unversioned +## 0.8.2 - Bump version of launcher templates `job.tpl` and `service.tpl` - `enableServiceLinks` now defaults to `false` for sessions (instead of not being set). diff --git a/charts/rstudio-workbench/README.md b/charts/rstudio-workbench/README.md index a17f6d04..98916514 100644 --- a/charts/rstudio-workbench/README.md +++ b/charts/rstudio-workbench/README.md @@ -1,6 +1,6 @@ # Posit Workbench -![Version: 0.8.1](https://img.shields.io/badge/Version-0.8.1-informational?style=flat-square) ![AppVersion: 2024.04.2](https://img.shields.io/badge/AppVersion-2024.04.2-informational?style=flat-square) +![Version: 0.8.2](https://img.shields.io/badge/Version-0.8.2-informational?style=flat-square) ![AppVersion: 2024.04.2](https://img.shields.io/badge/AppVersion-2024.04.2-informational?style=flat-square) #### _Official Helm chart for Posit Workbench_ @@ -24,11 +24,11 @@ To ensure a stable production deployment: ## Installing the chart -To install the chart with the release name `my-release` at version 0.8.1: +To install the chart with the release name `my-release` at version 0.8.2: ```{.bash} helm repo add rstudio https://helm.rstudio.com -helm upgrade --install my-release rstudio/rstudio-workbench --version=0.8.1 +helm upgrade --install my-release rstudio/rstudio-workbench --version=0.8.2 ``` To explore other chart versions, look at: From 8bb0e7148b1957b60a7fdb6936e24892122a7f14 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Wed, 25 Sep 2024 15:01:37 -0400 Subject: [PATCH 8/9] remove resources.enabled protection that was wrong and fix indentation --- charts/rstudio-connect/NEWS.md | 2 ++ charts/rstudio-connect/ci/complex-values.yaml | 2 -- charts/rstudio-connect/templates/deployment.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/rstudio-connect/NEWS.md b/charts/rstudio-connect/NEWS.md index 0b2ef17f..d2eabc9e 100644 --- a/charts/rstudio-connect/NEWS.md +++ b/charts/rstudio-connect/NEWS.md @@ -6,6 +6,8 @@ - `enableServiceLinks` now defaults to `false` for sessions (instead of not being set). To enable them for sessions, set `launcher.templateValues.enableServiceLinks: true`. - Also see related discussion [on the Kubernetes project](https://github.com/kubernetes/kubernetes/issues/121787) +- Removed a protection against `.resources.enabled = false` which was a [bad attempt at backwards compatibility two + years ago](https://github.com/rstudio/helm/pull/224) (v0.2.34) ## 0.7.8 diff --git a/charts/rstudio-connect/ci/complex-values.yaml b/charts/rstudio-connect/ci/complex-values.yaml index 3d6cab29..d1b88a98 100644 --- a/charts/rstudio-connect/ci/complex-values.yaml +++ b/charts/rstudio-connect/ci/complex-values.yaml @@ -110,12 +110,10 @@ replicas: 2 resources: requests: - enabled: false memory: "1Gi" cpu: "100m" ephemeralStorage: "100Mi" limits: - enabled: false memory: "2Gi" cpu: "2000m" ephemeralStorage: "200Mi" diff --git a/charts/rstudio-connect/templates/deployment.yaml b/charts/rstudio-connect/templates/deployment.yaml index d86f080d..7b8bd460 100644 --- a/charts/rstudio-connect/templates/deployment.yaml +++ b/charts/rstudio-connect/templates/deployment.yaml @@ -175,11 +175,11 @@ spec: {{- end }} {{ include "rstudio-library.license-mount" (dict "license" ( .Values.license )) | indent 10 }} {{- if .Values.pod.volumeMounts }} -{{ toYaml .Values.pod.volumeMounts | indent 10 }} + {{- toYaml .Values.pod.volumeMounts | nindent 10 }} {{- end }} {{- with .Values.resources }} resources: - {{ toYaml (omit . "enabled") | nindent 10 }} + {{- toYaml . | nindent 10 }} {{- end }} {{- if .Values.livenessProbe.enabled }} {{- $liveness := omit .Values.livenessProbe "enabled" }} From d1b8863c6e37f52cbd74cb444abbc2116d0ad67c Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Wed, 25 Sep 2024 21:12:39 -0400 Subject: [PATCH 9/9] bump workbench version --- charts/rstudio-workbench/Chart.yaml | 2 +- charts/rstudio-workbench/NEWS.md | 2 +- charts/rstudio-workbench/README.md | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/rstudio-workbench/Chart.yaml b/charts/rstudio-workbench/Chart.yaml index 6c24849f..bba6de8f 100644 --- a/charts/rstudio-workbench/Chart.yaml +++ b/charts/rstudio-workbench/Chart.yaml @@ -1,6 +1,6 @@ name: rstudio-workbench description: Official Helm chart for Posit Workbench -version: 0.8.2 +version: 0.8.3 apiVersion: v2 appVersion: 2024.09.0 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png diff --git a/charts/rstudio-workbench/NEWS.md b/charts/rstudio-workbench/NEWS.md index bdc3f5d8..ae836636 100644 --- a/charts/rstudio-workbench/NEWS.md +++ b/charts/rstudio-workbench/NEWS.md @@ -1,6 +1,6 @@ # Changelog -## Unversioned +## 0.8.3 - Bump version of launcher templates `job.tpl` and `service.tpl` - `enableServiceLinks` now defaults to `false` for sessions (instead of not being set). diff --git a/charts/rstudio-workbench/README.md b/charts/rstudio-workbench/README.md index b024c9f8..07f1a0cb 100644 --- a/charts/rstudio-workbench/README.md +++ b/charts/rstudio-workbench/README.md @@ -1,6 +1,6 @@ # Posit Workbench -![Version: 0.8.2](https://img.shields.io/badge/Version-0.8.2-informational?style=flat-square) ![AppVersion: 2024.09.0](https://img.shields.io/badge/AppVersion-2024.09.0-informational?style=flat-square) +![Version: 0.8.3](https://img.shields.io/badge/Version-0.8.3-informational?style=flat-square) ![AppVersion: 2024.09.0](https://img.shields.io/badge/AppVersion-2024.09.0-informational?style=flat-square) #### _Official Helm chart for Posit Workbench_ @@ -24,11 +24,11 @@ To ensure a stable production deployment: ## Installing the chart -To install the chart with the release name `my-release` at version 0.8.2: +To install the chart with the release name `my-release` at version 0.8.3: ```{.bash} helm repo add rstudio https://helm.rstudio.com -helm upgrade --install my-release rstudio/rstudio-workbench --version=0.8.2 +helm upgrade --install my-release rstudio/rstudio-workbench --version=0.8.3 ``` To explore other chart versions, look at: