diff --git a/LICENSE b/LICENSE index bd82e9e3..69ce4644 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 RStudio, PBC +Copyright (c) 2023 Posit Software, PBC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index fc6015d0..32cf71fb 100644 --- a/README.md +++ b/README.md @@ -23,14 +23,14 @@ Individual helm charts have their own documentation -- [RStudio Connect](./charts/rstudio-connect) -- [RStudio Workbench](./charts/rstudio-workbench) +- [Posit Connect](./charts/rstudio-connect) +- [Posit Workbench](./charts/rstudio-workbench) - [Posit Package Manager](./charts/rstudio-pm) Examples: - [All Examples](./examples) - - [RStudio Connect](./examples/connect/) + - [Posit Connect](./examples/connect/) - [Standalone RBAC for the Job Launcher](./examples/rbac) ### Other Charts @@ -46,7 +46,7 @@ Supporting and miscellaneous charts with varying levels of maintenance, usefulne **IMPORTANT:** -These charts are provided as a convenience to RStudio customers. If you have +These charts are provided as a convenience to Posit customers. If you have questions about these charts, you can ask them in the [issues](https://github.com/rstudio/helm/issues/new/choose) in the repository or to your support representative, who will route them appropriately. diff --git a/charts/posit-chronicle/Chart.yaml b/charts/posit-chronicle/Chart.yaml index d29ff972..4dd224da 100644 --- a/charts/posit-chronicle/Chart.yaml +++ b/charts/posit-chronicle/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: posit-chronicle description: Official Helm chart for Posit Chronicle Server -version: 0.2.0 +version: 0.2.1 appVersion: 2023.11.3 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png home: https://www.posit.co diff --git a/charts/posit-chronicle/NEWS.md b/charts/posit-chronicle/NEWS.md index 4186a0c9..98edf1a9 100644 --- a/charts/posit-chronicle/NEWS.md +++ b/charts/posit-chronicle/NEWS.md @@ -1,3 +1,11 @@ +# 0.2.1 + +- Update docs + +# 0.2.0 + +- Add values for `pod.terminationGracePeriodSeconds` and default `image.imagePullPolicy` = `IfNotPresent` + # 0.1.0 - Initial public release and integration into Posit's Helm repository. Includes diff --git a/charts/posit-chronicle/README.md b/charts/posit-chronicle/README.md index 5cc73d43..1878aea3 100644 --- a/charts/posit-chronicle/README.md +++ b/charts/posit-chronicle/README.md @@ -1,6 +1,6 @@ # Posit Chronicle -![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![AppVersion: 2023.11.3](https://img.shields.io/badge/AppVersion-2023.11.3-informational?style=flat-square) +![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![AppVersion: 2023.11.3](https://img.shields.io/badge/AppVersion-2023.11.3-informational?style=flat-square) #### _Official Helm chart for Posit Chronicle Server_ @@ -22,11 +22,11 @@ To ensure a stable production deployment, please: ## Installing the Chart -To install the chart with the release name `my-release` at version 0.2.0: +To install the chart with the release name `my-release` at version 0.2.1: ```bash helm repo add rstudio https://helm.rstudio.com -helm upgrade --install my-release rstudio/posit-chronicle --version=0.2.0 +helm upgrade --install my-release rstudio/posit-chronicle --version=0.2.1 ``` To explore other chart versions, take a look at: @@ -41,36 +41,41 @@ with the Workbench and Connect charts. To actually send data to the server, you will need to run the Chronicle agent as a sidecar container on your Workbench or Connect server pods by setting `pod.sidecar` in their respective `values.yaml` files -Here is an example of Helm values to run the agent sidecar in Workbench: +Here is an example of Helm values to run the agent sidecar in **Workbench**, +where we set up a shared volume between containers for audit logs: ```yaml pod: + # We will need to create a new volume to share audit logs between + # the rstudio (workbench) and chronicle-agent containers + volumes: + - name: logs + emptyDir: {} + volumeMounts: + - name: logs + mountPath: "/var/lib/rstudio-server/audit" sidecar: - name: chronicle-agent - image: posit-chronicle:2023.11.3 + image: ghcr.io/rstudio/chronicle-agent:2023.10.4 volumeMounts: - - name: CHRONICLE_PRODUCT_CLUSTER_ID - value: "posit-cluster-1" - name: logs mountPath: "/var/lib/rstudio-server/audit" env: - name: CHRONICLE_SERVER_ADDRESS - value: "http://chronicle-server.default.svc.cluster.local" + value: "http://chronicle-server.default" ``` -And here is an example of Helm values for Connect, where a Connect +And here is an example of Helm values for Connect, where a **Connect** API key from a Kubernetes Secret is used to unlock more detailed metrics: ```yaml pod: sidecar: - name: chronicle-agent - image: posit-chronicle:2023.11.3 + image: ghcr.io/rstudio/chronicle-agent:2023.10.4 env: - - name: CHRONICLE_PRODUCT_CLUSTER_ID - value: "posit-cluster-1" - name: CHRONICLE_SERVER_ADDRESS - value: "http://chronicle-server.default.svc.cluster.local" + value: "http://chronicle-server.default" - name: CONNECT_API_KEY valueFrom: secretKeyRef: diff --git a/charts/posit-chronicle/README.md.gotmpl b/charts/posit-chronicle/README.md.gotmpl index 53ce6a25..9ee900b8 100644 --- a/charts/posit-chronicle/README.md.gotmpl +++ b/charts/posit-chronicle/README.md.gotmpl @@ -15,36 +15,41 @@ with the Workbench and Connect charts. To actually send data to the server, you will need to run the Chronicle agent as a sidecar container on your Workbench or Connect server pods by setting `pod.sidecar` in their respective `values.yaml` files -Here is an example of Helm values to run the agent sidecar in Workbench: +Here is an example of Helm values to run the agent sidecar in **Workbench**, +where we set up a shared volume between containers for audit logs: ```yaml pod: + # We will need to create a new volume to share audit logs between + # the rstudio (workbench) and chronicle-agent containers + volumes: + - name: logs + emptyDir: {} + volumeMounts: + - name: logs + mountPath: "/var/lib/rstudio-server/audit" sidecar: - name: chronicle-agent - image: posit-chronicle:2023.11.3 + image: ghcr.io/rstudio/chronicle-agent:2023.10.4 volumeMounts: - - name: CHRONICLE_PRODUCT_CLUSTER_ID - value: "posit-cluster-1" - name: logs mountPath: "/var/lib/rstudio-server/audit" env: - name: CHRONICLE_SERVER_ADDRESS - value: "http://chronicle-server.default.svc.cluster.local" + value: "http://chronicle-server.default" ``` -And here is an example of Helm values for Connect, where a Connect +And here is an example of Helm values for Connect, where a **Connect** API key from a Kubernetes Secret is used to unlock more detailed metrics: ```yaml pod: sidecar: - name: chronicle-agent - image: posit-chronicle:2023.11.3 + image: ghcr.io/rstudio/chronicle-agent:2023.10.4 env: - - name: CHRONICLE_PRODUCT_CLUSTER_ID - value: "posit-cluster-1" - name: CHRONICLE_SERVER_ADDRESS - value: "http://chronicle-server.default.svc.cluster.local" + value: "http://chronicle-server.default" - name: CONNECT_API_KEY valueFrom: secretKeyRef: diff --git a/charts/rstudio-connect/Chart.lock b/charts/rstudio-connect/Chart.lock index a6a08723..762d48b9 100644 --- a/charts/rstudio-connect/Chart.lock +++ b/charts/rstudio-connect/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: rstudio-library repository: file://../rstudio-library - version: 0.1.27 -digest: sha256:623d9c7ae9b9501578e55f4dd041a934cc67546c2a5608678d88ac538b2cef00 -generated: "2023-10-24T10:12:40.139874-04:00" + version: 0.1.28 +digest: sha256:91ea79ae369c78eca2fd08f229bbb5db6fd955da040baca71b255181a2f8aa21 +generated: "2024-01-24T14:32:14.663744-05:00" diff --git a/charts/rstudio-connect/Chart.yaml b/charts/rstudio-connect/Chart.yaml index 89f1d3d0..a40e93c4 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 RStudio Connect -version: 0.5.12 +version: 0.5.13 apiVersion: v2 appVersion: 2024.01.0 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png @@ -13,7 +13,7 @@ maintainers: url: https://github.com/sol-eng dependencies: - name: rstudio-library - version: 0.1.27 + version: 0.1.28 repository: file://../rstudio-library annotations: artifacthub.io/images: | @@ -37,3 +37,4 @@ keywords: - "python" - "deploy" - "rstudio" + - "posit" diff --git a/charts/rstudio-connect/LICENSE b/charts/rstudio-connect/LICENSE index 27a72c80..76799d40 100644 --- a/charts/rstudio-connect/LICENSE +++ b/charts/rstudio-connect/LICENSE @@ -1,6 +1,6 @@ # MIT License -Copyright (c) 2021 RStudio PBC +Copyright (c) 2023 Posit Software, PBC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/charts/rstudio-connect/NEWS.md b/charts/rstudio-connect/NEWS.md index d72c0ae0..cd7fba70 100644 --- a/charts/rstudio-connect/NEWS.md +++ b/charts/rstudio-connect/NEWS.md @@ -1,3 +1,7 @@ +# 0.5.13 + +- Add option to set `pod.terminationGracePeriodSeconds` + # 0.5.12 - Bump Connect version to 2024.01.0 diff --git a/charts/rstudio-connect/README.md b/charts/rstudio-connect/README.md index 677e89e5..b233ff38 100644 --- a/charts/rstudio-connect/README.md +++ b/charts/rstudio-connect/README.md @@ -1,6 +1,6 @@ # RStudio Connect -![Version: 0.5.12](https://img.shields.io/badge/Version-0.5.12-informational?style=flat-square) ![AppVersion: 2024.01.0](https://img.shields.io/badge/AppVersion-2024.01.0-informational?style=flat-square) +![Version: 0.5.13](https://img.shields.io/badge/Version-0.5.13-informational?style=flat-square) ![AppVersion: 2024.01.0](https://img.shields.io/badge/AppVersion-2024.01.0-informational?style=flat-square) #### _Official Helm chart for RStudio Connect_ @@ -26,11 +26,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.5.12: +To install the chart with the release name `my-release` at version 0.5.13: ```bash helm repo add rstudio https://helm.rstudio.com -helm upgrade --install my-release rstudio/rstudio-connect --version=0.5.12 +helm upgrade --install my-release rstudio/rstudio-connect --version=0.5.13 ``` To explore other chart versions, take a look at: @@ -173,6 +173,7 @@ The Helm `config` values are converted into the `rstudio-connect.gcfg` service c | pod.port | int | `3939` | The containerPort used by the main pod container | | pod.securityContext | object | `{}` | Values to set the `securityContext` for the connect pod | | pod.sidecar | bool | `false` | An array of containers that will be run alongside the main pod | +| pod.terminationGracePeriodSeconds | int | `120` | The termination grace period seconds allowed for the pod before shutdown | | pod.volumeMounts | list | `[]` | An array of maps that is injected as-is into the "volumeMounts" component of the pod spec | | pod.volumes | list | `[]` | An array of maps that is injected as-is into the "volumes:" component of the pod spec | | podDisruptionBudget | object | `{}` | Pod disruption budget | diff --git a/charts/rstudio-connect/ci/complex-values.yaml b/charts/rstudio-connect/ci/complex-values.yaml index 5a4dba6c..ec98d601 100644 --- a/charts/rstudio-connect/ci/complex-values.yaml +++ b/charts/rstudio-connect/ci/complex-values.yaml @@ -25,6 +25,9 @@ service: podDisruptionBudget: minAvailable: 30% +nodeSelector: + something: special + pod: env: - name: RSTUDIO_CONNECT_HASTE @@ -45,9 +48,13 @@ pod: command: ["sleep"] args: ["infinity"] imagePullPolicy: "IfNotPresent" + # This will spin up the chronicle-agent sidecar container + - name: chronicle-agent + image: ghcr.io/rstudio/chronicle-agent:2023.10.4 + env: + - name: CHRONICLE_SERVER_ADDRESS + value: "http://chronicle-server.default" priorityClassName: something-fun - nodeSelector: - something: special tolerations: - key: "example-key" operator: "Exists" diff --git a/charts/rstudio-connect/templates/deployment.yaml b/charts/rstudio-connect/templates/deployment.yaml index 27582f0e..fecd7c58 100644 --- a/charts/rstudio-connect/templates/deployment.yaml +++ b/charts/rstudio-connect/templates/deployment.yaml @@ -209,6 +209,7 @@ spec: {{- if .Values.pod.sidecar }} {{ toYaml .Values.pod.sidecar | indent 6 }} {{- end }} + terminationGracePeriodSeconds: {{ .Values.pod.terminationGracePeriodSeconds }} volumes: - name: rstudio-connect-config configMap: diff --git a/charts/rstudio-connect/values.yaml b/charts/rstudio-connect/values.yaml index efefe3e3..336fc9bf 100644 --- a/charts/rstudio-connect/values.yaml +++ b/charts/rstudio-connect/values.yaml @@ -118,6 +118,8 @@ pod: securityContext: {} # -- The containerPort used by the main pod container port: 3939 + # -- The termination grace period seconds allowed for the pod before shutdown + terminationGracePeriodSeconds: 120 # -- The pod's run command. By default, it uses the container's default command: [] diff --git a/charts/rstudio-launcher-rbac/Chart.lock b/charts/rstudio-launcher-rbac/Chart.lock index d4f826bc..8a9ac7cc 100644 --- a/charts/rstudio-launcher-rbac/Chart.lock +++ b/charts/rstudio-launcher-rbac/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: rstudio-library repository: file://../rstudio-library - version: 0.1.27 -digest: sha256:623d9c7ae9b9501578e55f4dd041a934cc67546c2a5608678d88ac538b2cef00 -generated: "2023-10-24T10:18:58.864999-04:00" + version: 0.1.28 +digest: sha256:91ea79ae369c78eca2fd08f229bbb5db6fd955da040baca71b255181a2f8aa21 +generated: "2024-01-24T14:32:17.220248-05:00" diff --git a/charts/rstudio-launcher-rbac/Chart.yaml b/charts/rstudio-launcher-rbac/Chart.yaml index 5edceabf..6f056ce9 100644 --- a/charts/rstudio-launcher-rbac/Chart.yaml +++ b/charts/rstudio-launcher-rbac/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: rstudio-launcher-rbac description: RBAC definition for the RStudio Job Launcher type: application -version: 0.2.18 -appVersion: 0.2.18 +version: 0.2.19 +appVersion: 0.2.19 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png sources: - https://github.com/rstudio/helm @@ -13,7 +13,7 @@ maintainers: url: https://github.com/sol-eng dependencies: - name: rstudio-library - version: 0.1.27 + version: 0.1.28 repository: file://../rstudio-library keywords: - "data science" @@ -21,3 +21,4 @@ keywords: - "launcher" - "rbac" - "rstudio" + - "posit" diff --git a/charts/rstudio-launcher-rbac/LICENSE b/charts/rstudio-launcher-rbac/LICENSE index 27a72c80..76799d40 100644 --- a/charts/rstudio-launcher-rbac/LICENSE +++ b/charts/rstudio-launcher-rbac/LICENSE @@ -1,6 +1,6 @@ # MIT License -Copyright (c) 2021 RStudio PBC +Copyright (c) 2023 Posit Software, PBC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/charts/rstudio-launcher-rbac/NEWS.md b/charts/rstudio-launcher-rbac/NEWS.md index 7259a94b..1117fbcb 100644 --- a/charts/rstudio-launcher-rbac/NEWS.md +++ b/charts/rstudio-launcher-rbac/NEWS.md @@ -1,4 +1,4 @@ -# 0.2.18 +# 0.2.18+ - Bump rstudio-library to `0.1.27` - Fix an issue with `mountPath` and `subPath` when `license.file.mountSubPath` is `true` diff --git a/charts/rstudio-launcher-rbac/README.md b/charts/rstudio-launcher-rbac/README.md index c09f746d..d13b5516 100644 --- a/charts/rstudio-launcher-rbac/README.md +++ b/charts/rstudio-launcher-rbac/README.md @@ -1,6 +1,6 @@ # rstudio-launcher-rbac -![Version: 0.2.18](https://img.shields.io/badge/Version-0.2.18-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.18](https://img.shields.io/badge/AppVersion-0.2.18-informational?style=flat-square) +![Version: 0.2.19](https://img.shields.io/badge/Version-0.2.19-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.19](https://img.shields.io/badge/AppVersion-0.2.19-informational?style=flat-square) #### _RBAC definition for the RStudio Job Launcher_ @@ -18,11 +18,11 @@ To ensure a stable production deployment, please: ## Installing the Chart -To install the chart with the release name `my-release` at version 0.2.18: +To install the chart with the release name `my-release` at version 0.2.19: ```bash helm repo add rstudio https://helm.rstudio.com -helm upgrade --install my-release rstudio/rstudio-launcher-rbac --version=0.2.18 +helm upgrade --install my-release rstudio/rstudio-launcher-rbac --version=0.2.19 ``` To explore other chart versions, take a look at: diff --git a/charts/rstudio-library/Chart.yaml b/charts/rstudio-library/Chart.yaml index 33169303..bd814282 100644 --- a/charts/rstudio-library/Chart.yaml +++ b/charts/rstudio-library/Chart.yaml @@ -1,9 +1,9 @@ apiVersion: v2 name: rstudio-library -description: Helm library helpers for use by Official RStudio charts +description: Helm library helpers for use by official RStudio charts type: library -version: 0.1.27 -appVersion: 0.1.27 +version: 0.1.28 +appVersion: 0.1.28 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png home: https://www.rstudio.com @@ -23,3 +23,4 @@ annotations: keywords: - "rstudio" - "library" + - "posit" diff --git a/charts/rstudio-library/NEWS.md b/charts/rstudio-library/NEWS.md index af18463a..c6f8ceb2 100644 --- a/charts/rstudio-library/NEWS.md +++ b/charts/rstudio-library/NEWS.md @@ -1,3 +1,7 @@ +# 0.1.28 + +- Tweak docs a bit + # 0.1.27 - Fix an issue with `mountPath` and `subPath` when `license.file.mountSubPath` is `true` ([#427](https://github.com/rstudio/helm/issues/427)). diff --git a/charts/rstudio-library/README.md b/charts/rstudio-library/README.md index 3d41b94d..8882e3d6 100644 --- a/charts/rstudio-library/README.md +++ b/charts/rstudio-library/README.md @@ -1,8 +1,8 @@ # rstudio-library -![Version: 0.1.27](https://img.shields.io/badge/Version-0.1.27-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.1.27](https://img.shields.io/badge/AppVersion-0.1.27-informational?style=flat-square) +![Version: 0.1.28](https://img.shields.io/badge/Version-0.1.28-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.1.28](https://img.shields.io/badge/AppVersion-0.1.28-informational?style=flat-square) -#### _Helm library helpers for use by Official RStudio charts_ +#### _Helm library helpers for use by official RStudio charts_ ## For Production diff --git a/charts/rstudio-library/templates/_profiles.tpl b/charts/rstudio-library/templates/_profiles.tpl index bc9f9698..c9da0993 100644 --- a/charts/rstudio-library/templates/_profiles.tpl +++ b/charts/rstudio-library/templates/_profiles.tpl @@ -155,7 +155,7 @@ Builds a single ini file Modified from rstudio-library.config.ini to: - collapse arrays - - via rstudio-library.profiles.collapse-array.ini + - via rstudio-library.profiles.ini.collapse-array */}} {{- define "rstudio-library.profiles.ini.singleFile" -}} {{- range $parent, $child := . -}} diff --git a/charts/rstudio-pm/Chart.lock b/charts/rstudio-pm/Chart.lock index ad095e92..f5d96545 100644 --- a/charts/rstudio-pm/Chart.lock +++ b/charts/rstudio-pm/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: rstudio-library repository: file://../rstudio-library - version: 0.1.27 -digest: sha256:623d9c7ae9b9501578e55f4dd041a934cc67546c2a5608678d88ac538b2cef00 -generated: "2023-10-24T10:12:51.381873-04:00" + version: 0.1.28 +digest: sha256:91ea79ae369c78eca2fd08f229bbb5db6fd955da040baca71b255181a2f8aa21 +generated: "2024-01-24T14:32:19.778048-05:00" diff --git a/charts/rstudio-pm/Chart.yaml b/charts/rstudio-pm/Chart.yaml index f8e3ac36..299b90a5 100644 --- a/charts/rstudio-pm/Chart.yaml +++ b/charts/rstudio-pm/Chart.yaml @@ -1,6 +1,6 @@ name: rstudio-pm description: Official Helm chart for RStudio Package Manager -version: 0.5.18 +version: 0.5.19 apiVersion: v2 appVersion: 2023.12.0 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png @@ -14,7 +14,7 @@ maintainers: url: https://github.com/rstudio/helm dependencies: - name: rstudio-library - version: 0.1.27 + version: 0.1.28 repository: file://../rstudio-library annotations: artifacthub.io/images: | @@ -40,3 +40,4 @@ keywords: - "pip" - "bioconductor" - "rstudio" + - "posit" diff --git a/charts/rstudio-pm/LICENSE b/charts/rstudio-pm/LICENSE index 27a72c80..76799d40 100644 --- a/charts/rstudio-pm/LICENSE +++ b/charts/rstudio-pm/LICENSE @@ -1,6 +1,6 @@ # MIT License -Copyright (c) 2021 RStudio PBC +Copyright (c) 2023 Posit Software, PBC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/charts/rstudio-pm/NEWS.md b/charts/rstudio-pm/NEWS.md index 636682b2..fedda21e 100644 --- a/charts/rstudio-pm/NEWS.md +++ b/charts/rstudio-pm/NEWS.md @@ -1,3 +1,7 @@ +# 0.5.19 + +- Add option to set `pod.terminationGracePeriodSeconds` + # 0.5.18 - Update default Posit Package Manager version to 2023.12.0-13 diff --git a/charts/rstudio-pm/README.md b/charts/rstudio-pm/README.md index df016423..02aebd21 100644 --- a/charts/rstudio-pm/README.md +++ b/charts/rstudio-pm/README.md @@ -1,6 +1,6 @@ # RStudio Package Manager -![Version: 0.5.18](https://img.shields.io/badge/Version-0.5.18-informational?style=flat-square) ![AppVersion: 2023.12.0](https://img.shields.io/badge/AppVersion-2023.12.0-informational?style=flat-square) +![Version: 0.5.19](https://img.shields.io/badge/Version-0.5.19-informational?style=flat-square) ![AppVersion: 2023.12.0](https://img.shields.io/badge/AppVersion-2023.12.0-informational?style=flat-square) #### _Official Helm chart for RStudio Package Manager_ @@ -21,11 +21,11 @@ To ensure a stable production deployment, please: ## Installing the Chart -To install the chart with the release name `my-release` at version 0.5.18: +To install the chart with the release name `my-release` at version 0.5.19: ```bash helm repo add rstudio https://helm.rstudio.com -helm upgrade --install my-release rstudio/rstudio-pm --version=0.5.18 +helm upgrade --install my-release rstudio/rstudio-pm --version=0.5.19 ``` To explore other chart versions, take a look at: @@ -189,6 +189,7 @@ The Helm `config` values are converted into the `rstudio-pm.gcfg` service config | pod.lifecycle | object | `{}` | Container [lifecycle hooks](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) | | pod.securityContext | object | `{}` | the [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for the pod | | pod.serviceAccountName | string | `""` | Deprecated, use `serviceAccount.name` instead | +| pod.terminationGracePeriodSeconds | int | `120` | The termination grace period seconds allowed for the pod before shutdown | | pod.volumeMounts | list | `[]` | volumeMounts is an array of maps that is injected as-is into the "volumeMounts" component of the pod spec | | pod.volumes | list | `[]` | volumes is an array of maps that is injected as-is into the "volumes:" component of the pod spec | | podDisruptionBudget | object | `{}` | Pod disruption budget | diff --git a/charts/rstudio-pm/templates/deployment.yaml b/charts/rstudio-pm/templates/deployment.yaml index b24a3198..f7fff44c 100644 --- a/charts/rstudio-pm/templates/deployment.yaml +++ b/charts/rstudio-pm/templates/deployment.yaml @@ -166,6 +166,7 @@ spec: {{- if .Values.extraContainers }} {{- toYaml .Values.extraContainers | nindent 6 }} {{- end }} + terminationGracePeriodSeconds: {{ .Values.pod.terminationGracePeriodSeconds }} volumes: - name: rstudio-pm-config configMap: diff --git a/charts/rstudio-pm/values.yaml b/charts/rstudio-pm/values.yaml index 75b8934a..6034f21e 100644 --- a/charts/rstudio-pm/values.yaml +++ b/charts/rstudio-pm/values.yaml @@ -135,6 +135,8 @@ pod: drop: ["ALL"] seccompProfile: type: "{{ if .Values.enableSandboxing }}Unconfined{{ else }}RuntimeDefault{{ end }}" + # -- The termination grace period seconds allowed for the pod before shutdown + terminationGracePeriodSeconds: 120 # -- Extra objects to deploy (value evaluated as a template) extraObjects: [] diff --git a/charts/rstudio-workbench/Chart.lock b/charts/rstudio-workbench/Chart.lock index ffd1dc50..27b5f731 100644 --- a/charts/rstudio-workbench/Chart.lock +++ b/charts/rstudio-workbench/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: rstudio-library repository: file://../rstudio-library - version: 0.1.27 -digest: sha256:623d9c7ae9b9501578e55f4dd041a934cc67546c2a5608678d88ac538b2cef00 -generated: "2023-10-24T10:12:25.831246-04:00" + version: 0.1.28 +digest: sha256:91ea79ae369c78eca2fd08f229bbb5db6fd955da040baca71b255181a2f8aa21 +generated: "2024-01-24T14:32:22.301792-05:00" diff --git a/charts/rstudio-workbench/Chart.yaml b/charts/rstudio-workbench/Chart.yaml index e3717732..9265b811 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 RStudio Workbench -version: 0.6.13 +version: 0.6.14 apiVersion: v2 appVersion: 2023.12.1 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png @@ -13,7 +13,7 @@ maintainers: url: https://github.com/sol-eng dependencies: - name: rstudio-library - version: 0.1.27 + version: 0.1.28 repository: file://../rstudio-library annotations: artifacthub.io/images: | diff --git a/charts/rstudio-workbench/LICENSE b/charts/rstudio-workbench/LICENSE index 27a72c80..76799d40 100644 --- a/charts/rstudio-workbench/LICENSE +++ b/charts/rstudio-workbench/LICENSE @@ -1,6 +1,6 @@ # MIT License -Copyright (c) 2021 RStudio PBC +Copyright (c) 2023 Posit Software, PBC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/charts/rstudio-workbench/NEWS.md b/charts/rstudio-workbench/NEWS.md index 9514c914..0946c074 100644 --- a/charts/rstudio-workbench/NEWS.md +++ b/charts/rstudio-workbench/NEWS.md @@ -1,3 +1,9 @@ +# 0.6.14 + +- Add option to set `pod.terminationGracePeriodSeconds` +- Add protection for `prestart-launcher.bash` to be OS-agnostic in certificate modification + ([#453](https://github.com/rstudio/helm/pull/453)) + # 0.6.13 - Bump Workbench version to 2023.12.1 diff --git a/charts/rstudio-workbench/README.md b/charts/rstudio-workbench/README.md index 1e87e46a..5132c373 100644 --- a/charts/rstudio-workbench/README.md +++ b/charts/rstudio-workbench/README.md @@ -1,6 +1,6 @@ # RStudio Workbench -![Version: 0.6.13](https://img.shields.io/badge/Version-0.6.13-informational?style=flat-square) ![AppVersion: 2023.12.1](https://img.shields.io/badge/AppVersion-2023.12.1-informational?style=flat-square) +![Version: 0.6.14](https://img.shields.io/badge/Version-0.6.14-informational?style=flat-square) ![AppVersion: 2023.12.1](https://img.shields.io/badge/AppVersion-2023.12.1-informational?style=flat-square) #### _Official Helm chart for RStudio Workbench_ @@ -27,11 +27,11 @@ To ensure a stable production deployment, please: ## Installing the Chart -To install the chart with the release name `my-release` at version 0.6.13: +To install the chart with the release name `my-release` at version 0.6.14: ```bash helm repo add rstudio https://helm.rstudio.com -helm upgrade --install my-release rstudio/rstudio-workbench --version=0.6.13 +helm upgrade --install my-release rstudio/rstudio-workbench --version=0.6.14 ``` To explore other chart versions, take a look at: @@ -472,6 +472,7 @@ Use of [Sealed Secrets](https://github.com/bitnami-labs/sealed-secrets) disables | pod.port | int | `8787` | The containerPort used by the main pod container | | pod.securityContext | object | `{}` | Values to set the `securityContext` for the service pod | | pod.sidecar | list | `[]` | sidecar is an array of containers that will be run alongside the main container | +| pod.terminationGracePeriodSeconds | int | `120` | The termination grace period seconds allowed for the pod before shutdown | | pod.volumeMounts | list | `[]` | volumeMounts is injected as-is into the "volumeMounts:" component of the pod.container spec | | pod.volumes | list | `[]` | volumes is injected as-is into the "volumes:" component of the pod.container spec | | podDisruptionBudget | object | `{}` | Pod disruption budget | diff --git a/charts/rstudio-workbench/ci/complex-values.yaml b/charts/rstudio-workbench/ci/complex-values.yaml index d85ae5ab..b213adf5 100644 --- a/charts/rstudio-workbench/ci/complex-values.yaml +++ b/charts/rstudio-workbench/ci/complex-values.yaml @@ -15,25 +15,35 @@ replicas: 2 sealedSecret: enabled: true annotations: - is-a-sealed-secret: yes + is-a-sealed-secret: "yes" revisionHistoryLimit: 3 + pod: env: - name: TEST_ENV_WORKS value: "true" volumeMounts: - - name: key - mountPath: /tmp/somepath + - name: logs + mountPath: "/var/lib/rstudio-server/audit" volumes: - - name: key + - name: logs emptyDir: {} labels: app.kubernetes.io/part-of: rstudio-team annotations: testannotation2: three + # This will spin up the chronicle-agent sidecar container sidecar: - - name: test + - name: chronicle-agent + image: ghcr.io/rstudio/chronicle-agent:2023.10.4 + volumeMounts: + - name: logs + mountPath: "/var/lib/rstudio-server/audit" + env: + - name: CHRONICLE_SERVER_ADDRESS + value: "http://chronicle-server.default" + - name: busybox-sidecar image: "busybox" imagePullPolicy: "IfNotPresent" diff --git a/charts/rstudio-workbench/prestart-launcher.bash b/charts/rstudio-workbench/prestart-launcher.bash index 6c9fe8f1..ff5d06ad 100644 --- a/charts/rstudio-workbench/prestart-launcher.bash +++ b/charts/rstudio-workbench/prestart-launcher.bash @@ -38,8 +38,13 @@ main() { /usr/local/share/ca-certificates/Kubernetes/cert-Kubernetes.crt 2>&1 | _indent _logf 'Updating CA certificates' - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ + PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + DIST=$(cat /etc/os-release | grep "^ID=" -E -m 1 | cut -c 4-10 | sed 's/"//g') + if [[ $DIST == "ubuntu" ]]; then update-ca-certificates 2>&1 | _indent + elif [[ $DIST == "rhel" || $DIST == "almalinux" ]]; then + update-ca-trust 2>&1 | _indent + fi _logf 'Preparing dirs' mkdir -p \ diff --git a/charts/rstudio-workbench/templates/deployment.yaml b/charts/rstudio-workbench/templates/deployment.yaml index 380a1d05..ed123099 100644 --- a/charts/rstudio-workbench/templates/deployment.yaml +++ b/charts/rstudio-workbench/templates/deployment.yaml @@ -86,6 +86,7 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + terminationGracePeriodSeconds: {{ .Values.pod.terminationGracePeriodSeconds }} {{- if .Values.initContainers }} initContainers: {{- toYaml .Values.initContainers | nindent 8 }} @@ -95,5 +96,7 @@ spec: see "_helpers.tpl" for the definition we define in a helper so that the same definition can be used in tests + + NOTE: this also includes volumes too!! */ -}} {{ include "rstudio-workbench.containers" . | indent 6 }} diff --git a/charts/rstudio-workbench/values.yaml b/charts/rstudio-workbench/values.yaml index b930803f..64194972 100644 --- a/charts/rstudio-workbench/values.yaml +++ b/charts/rstudio-workbench/values.yaml @@ -310,6 +310,8 @@ pod: port: 8787 # -- container lifecycle hooks lifecycle: {} + # -- The termination grace period seconds allowed for the pod before shutdown + terminationGracePeriodSeconds: 120 prometheusExporter: # -- whether the prometheus exporter sidecar should be enabled diff --git a/docs/customize.md b/docs/customize.md index 60a591f3..c100d743 100644 --- a/docs/customize.md +++ b/docs/customize.md @@ -1,12 +1,12 @@ # Customize Kubernetes Jobs -This doc discusses customizing Kubernetes Jobs in the context of the RStudio Job Launcher. -This is relevant for both RStudio Workbench and RStudio Connect when the job launcher is enabled. +This doc discusses customizing Kubernetes Jobs in the context of the Posit Job Launcher. +This is relevant for both Posit Workbench and Posit Connect when the job launcher is enabled. ## Job Json Overrides The original mechanism for modifying kubernetes jobs using the Job Launcher is to use -[`job-json-overrides`](https://docs.rstudio.com/job-launcher/kube.html#kube-json). +[`job-json-overrides`](https://docs.posit.co/ide/server-pro/job_launcher/job_launcher.html). [There is a support article discussing the topic and examples in a legacy context here](https://support.rstudio.com/hc/en-us/articles/360051652094-Using-Job-Json-Overrides-with-RStudio-Server-Pro-and-Kubernetes) @@ -36,10 +36,10 @@ See examples below. ### Override Syntax -The `job-json-override` spec is discussed in detail [in the RStudio Launcher documentation](https://docs.rstudio.com/job-launcher/kube.html#kube-json). +The `job-json-override` spec is discussed in detail [in the Posit Launcher documentation](https://docs.posit.co/ide/server-pro/job_launcher/job_launcher.html). It uses the [JSON Pointer RFC](https://tools.ietf.org/html/rfc6901). -Some points that will be helpful to reference: +Some points that are helpful to reference: - An array suffixed with `-` will "append" to the array (i.e. `/spec/templates/spec/volumes/-` will leave pre-defined volumes intact, but add a new entry) @@ -61,7 +61,7 @@ Add a placement constraint to the session pod with key `kubernetes.io/key` and v ``` **NOTE**: it is possible to use -the [`placement-constraints` configuration](https://docs.rstudio.com/job-launcher/kube.html#kube-profiles) within the " +the [`placement-constraints` configuration](https://docs.posit.co/ide/server-pro/job_launcher/job_launcher.html) within the " Profiles" configuration. However, this modifies the Workbench UI and is not enabled by default. (It requires user input to have the profiles included) diff --git a/examples/rbac/rstudio-launcher-rbac-0.2.19.yaml b/examples/rbac/rstudio-launcher-rbac-0.2.19.yaml new file mode 100644 index 00000000..3b322f8d --- /dev/null +++ b/examples/rbac/rstudio-launcher-rbac-0.2.19.yaml @@ -0,0 +1,88 @@ +--- +# Source: rstudio-launcher-rbac/templates/rbac.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: rstudio-launcher-rbac +--- +# Source: rstudio-launcher-rbac/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: rstudio-launcher-rbac +rules: + - apiGroups: + - "" + resources: + - "serviceaccounts" + verbs: + - "list" + - apiGroups: + - "" + resources: + - "pods/log" + verbs: + - "get" + - "watch" + - "list" + - apiGroups: + - "" + resources: + - "pods" + - "pods/attach" + - "pods/exec" + verbs: + - "get" + - "create" + - "update" + - "patch" + - "watch" + - "list" + - "delete" + - apiGroups: + - "" + resources: + - "events" + verbs: + - "watch" + - apiGroups: + - "" + resources: + - "services" + verbs: + - "create" + - "get" + - "watch" + - "list" + - "delete" + - apiGroups: + - "batch" + resources: + - "jobs" + verbs: + - "create" + - "update" + - "patch" + - "get" + - "watch" + - "list" + - "delete" + - apiGroups: + - "metrics.k8s.io" + resources: + - "pods" + verbs: + - "get" +--- +# Source: rstudio-launcher-rbac/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: rstudio-launcher-rbac +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: rstudio-launcher-rbac +subjects: + - kind: ServiceAccount + name: rstudio-launcher-rbac