-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from rstudio/add-other-charts
Add other charts
- Loading branch information
Showing
12 changed files
with
307 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- uses: r-lib/actions/pr-fetch@master | ||
- uses: r-lib/actions/pr-fetch@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
@@ -32,15 +32,16 @@ jobs: | |
- name: Run helm-docs | ||
run: | | ||
./helm-docs --chart-search-root=charts --template-files=README.md.gotmpl --template-files=./_templates.gotmpl | ||
./helm-docs --chart-search-root=other-charts --template-files=README.md.gotmpl --template-files=./_templates.gotmpl | ||
- name: Commit results | ||
run: | | ||
set -xe | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Actions" | ||
git commit charts/*/README.md -m 'Update helm-docs and README.md' || echo "No changes to commit" | ||
git commit other-charts/*/README.md charts/*/README.md -m 'Update helm-docs and README.md' || echo "No changes to commit" | ||
- uses: r-lib/actions/pr-push@master | ||
- uses: r-lib/actions/pr-push@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
@@ -52,7 +53,7 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- uses: r-lib/actions/pr-fetch@master | ||
- uses: r-lib/actions/pr-fetch@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
@@ -77,6 +78,6 @@ jobs: | |
git add examples/rbac/rstudio-launcher-rbac*.yaml || echo "No files to add" | ||
git commit examples/rbac/rstudio-launcher-rbac*.yaml -m 'Update rbac yaml' || echo "No changes to commit" | ||
- uses: r-lib/actions/pr-push@master | ||
- uses: r-lib/actions/pr-push@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,11 @@ jobs: | |
charts_repo_url: https://helm.rstudio.com | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Run chart-releaser (other) | ||
uses: helm/[email protected] | ||
with: | ||
charts_dir: other-charts | ||
charts_repo_url: https://helm.rstudio.com | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{{- define "rstudio.blurb" }} | ||
{{- if eq .Name "rstudio-connect" -}} | ||
Business Users and Collaborators use R and Python data products on [RStudio Connect](https://www.rstudio.com/products/connect/) | ||
that are published by Data Scientists. | ||
{{- else if eq .Name "rstudio-pm" -}} | ||
IT Administrators use [RStudio Package Manager](https://www.rstudio.com/products/package-manager/) to control and manage | ||
R and Python packages that Data Scientists need to create and share data products. | ||
{{- else if eq .Name "rstudio-workbench" -}} | ||
Data Scientists use [RStudio Workbench](https://www.rstudio.com/products/workbench/) to analyze data and create data | ||
products using R and Python. | ||
{{- end -}} | ||
{{- end }} | ||
|
||
{{- define "rstudio.description" }} | ||
{{- print "#### _" }}{{- template "chart.description" . }}_ | ||
{{- print "" | nindent 0 }} | ||
{{- print "" | nindent 0 }} | ||
{{- template "rstudio.blurb" . }} | ||
{{- end }} | ||
|
||
{{- define "rstudio.header" }} | ||
{{- if eq .Name "rstudio-connect" -}} | ||
# RStudio Connect | ||
{{- else if eq .Name "rstudio-pm" -}} | ||
# RStudio Package Manager | ||
{{- else if eq .Name "rstudio-workbench" -}} | ||
# RStudio Workbench | ||
{{- else -}} | ||
{{ template "chart.header" . }} | ||
{{- end }} | ||
{{ print "" | nindent 0 }} | ||
{{- end }} | ||
|
||
|
||
{{- define "rstudio.disclaimer" }} | ||
|
||
## Disclaimer | ||
|
||
> This chart is "beta" quality. It will likely undergo | ||
> breaking changes without warning as it moves towards stability. | ||
|
||
As a result, please: | ||
* Ensure you "pin" the version of the Helm chart that you are using. You can do | ||
this using the `helm dependency` command and the associated "Chart.lock" files | ||
or the `--version` flag. IMPORTANT: This protects you from breaking changes | ||
* Before upgrading, to avoid breaking changes, use `helm diff upgrade` to check | ||
for breaking changes | ||
* Pay close attention to [`NEWS.md`](./NEWS.md) for updates on breaking | ||
changes, as well as documentation below on how to use the chart | ||
|
||
{{- end }} | ||
|
||
{{- define "rstudio.install" }} | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `my-release` at version {{ template "chart.version" . }}: | ||
|
||
```bash | ||
helm repo add rstudio https://helm.rstudio.com | ||
helm install {{- if (regexMatch "[0-9]+\\.[0-9]+\\.[0-9]+-[a-zA-Z\\.0-9]+" .Version) }} --devel{{ end }} my-release rstudio/{{ template "chart.name" . }} --version={{ template "chart.version" . }} | ||
``` | ||
|
||
{{- end }} | ||
|
||
{{ define "rstudio.examples1" -}} | ||
{{ . }} | ||
{{ kindOf . }} | ||
{{ typeOf . }} | ||
{{ typeOf .Values }} | ||
{{ .ChartDirectory }} | ||
|
||
{{ toPrettyJson . }} | ||
# Examples | ||
{{- end }} | ||
|
||
{{ define "rstudio.examples" -}} | ||
{{ . }} | ||
{{ kindOf . }} | ||
{{ typeOf . }} | ||
{{ typeOf .Values }} | ||
{{ .ChartDirectory }} | ||
|
||
{{ toPrettyJson . }} | ||
# Examples | ||
{{- end }} | ||
|
||
{{- /* | ||
Interesting example that does not work... but I fought hard for... for some reason: | ||
|
||
{{ $currentScope := . }} | ||
{{ range $path, $_ := $.Files.Glob "{{ .ChartDirectory }}/ci/*.yaml" }} | ||
{{- with $currentScope }} | ||
{{ $.Files.Get $path }} | ||
{{- end }} | ||
{{ end }} | ||
*/ -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: prepull-daemonset | ||
description: a daemonset to prepull images so they are cached | ||
version: 0.0.2 | ||
apiVersion: v2 | ||
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png | ||
home: https://www.rstudio.com | ||
sources: | ||
- https://github.com/rstudio/helm | ||
maintainers: | ||
- name: sol-eng | ||
email: [email protected] | ||
url: https://github.com/sol-eng | ||
annotations: | ||
artifacthub.io/images: | | ||
- name: ubuntu | ||
image: ubuntu:bionic | ||
- name: pause | ||
image: gcr.io/google_containers/pause | ||
artifacthub.io/license: MIT | ||
artifacthub.io/links: | | ||
- name: Docker Images | ||
url: https://github.com/rstudio/rstudio-docker-products | ||
- name: RStudio Community | ||
url: https://community.rstudio.com/c/r-admin/5 | ||
keywords: | ||
- "prepull" | ||
- "bootstrap" | ||
- "image-cache" | ||
- "auto-scaling" | ||
- "startup" | ||
- "container" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# 0.0.2 | ||
|
||
- Add optional randomization to redeploy the daemonset on each deployment | ||
- Add values to configure the updateStrategy | ||
|
||
# 0.0.1 | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# prepull-daemonset | ||
|
||
![Version: 0.0.2](https://img.shields.io/badge/Version-0.0.2-informational?style=flat-square) | ||
|
||
#### _a daemonset to prepull images so they are cached_ | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `my-release` at version 0.0.2: | ||
|
||
```bash | ||
helm repo add rstudio https://helm.rstudio.com | ||
helm install my-release rstudio/prepull-daemonset --version=0.0.2 | ||
``` | ||
|
||
## Use | ||
|
||
Create a `values.yaml` file somewhere that lists the images you'd like to be pre-pulled (use the `values.yaml` file in this repo for format): | ||
|
||
``` | ||
images: | ||
- name: my-first-image | ||
image: some-id.dkr.ecr.us-east-1.amazonaws.com/my-ecr-repo:latest | ||
- name: my-second-image | ||
image: some-id.dkr.ecr.us-east-1.amazonaws.com/my-other-repo:latest | ||
- name: my-third-public-image | ||
image: ubuntu:bionic | ||
``` | ||
|
||
## Pull Again | ||
|
||
To run the pre-pull again (i.e. to pull new images with the same tag, to ensure node | ||
caches<sup>†</sup> are fresh), there are a few options: | ||
|
||
``` | ||
# by default, every upgrade is randomized / does a rollout (`--set randomize=false` to disable this behavior) | ||
helm upgrade install prepull-daemonset rstudio/prepull-daemonset | ||
# or use kubectl | ||
kubectl rollout restart daemonset/prepull-daemonset | ||
``` | ||
|
||
> <sup>†</sup> Kubernetes Nodes (specifically, the `kubelet` service) periodically remove images from | ||
> the node's cache to free up disk space, especially if an image is not in use and has | ||
> not been used lately | ||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| images[0].image | string | `"ubuntu:bionic"` | | | ||
| images[0].name | string | `"ubuntu-bionic"` | | | ||
| randomize | bool | `true` | | | ||
| updateStrategy | object | `{}` | | | ||
|
||
---------------------------------------------- | ||
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{{ template "rstudio.header" . }} | ||
|
||
{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} | ||
|
||
{{ template "rstudio.description" . }} | ||
|
||
{{ template "rstudio.install" . }} | ||
|
||
## Use | ||
|
||
Create a `values.yaml` file somewhere that lists the images you'd like to be pre-pulled (use the `values.yaml` file in this repo for format): | ||
|
||
``` | ||
images: | ||
- name: my-first-image | ||
image: some-id.dkr.ecr.us-east-1.amazonaws.com/my-ecr-repo:latest | ||
- name: my-second-image | ||
image: some-id.dkr.ecr.us-east-1.amazonaws.com/my-other-repo:latest | ||
- name: my-third-public-image | ||
image: ubuntu:bionic | ||
``` | ||
|
||
## Pull Again | ||
|
||
To run the pre-pull again (i.e. to pull new images with the same tag, to ensure node | ||
caches<sup>†</sup> are fresh), there are a few options: | ||
|
||
``` | ||
# by default, every upgrade is randomized / does a rollout (`--set randomize=false` to disable this behavior) | ||
helm upgrade install prepull-daemonset rstudio/prepull-daemonset | ||
|
||
# or use kubectl | ||
kubectl rollout restart daemonset/prepull-daemonset | ||
``` | ||
|
||
> <sup>†</sup> Kubernetes Nodes (specifically, the `kubelet` service) periodically remove images from | ||
> the node's cache to free up disk space, especially if an image is not in use and has | ||
> not been used lately | ||
|
||
{{ template "chart.valuesSection" . }} | ||
|
||
{{ template "helm-docs.versionFooter" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: {{ .Chart.Name | trunc 63 | trimSuffix "-" }} | ||
labels: | ||
app: {{ .Chart.Name | trunc 63 | trimSuffix "-" }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
name: {{ .Chart.Name | trunc 63 | trimSuffix "-" }} | ||
{{- with .Values.updateStrategy }} | ||
updateStrategy: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
template: | ||
metadata: | ||
annotations: | ||
{{- if .Values.randomize }} | ||
rollme: {{ randAlphaNum 10 | quote }} | ||
{{- end }} | ||
labels: | ||
name: {{ .Chart.Name | trunc 63 | trimSuffix "-" }} | ||
spec: | ||
initContainers: | ||
{{- range .Values.images }} | ||
- name: prepull-{{ .name }} | ||
image: {{ .image }} | ||
imagePullPolicy: Always | ||
command: ["echo"] | ||
args: ["Finished pre-pull"] | ||
{{- end }} | ||
containers: | ||
- name: pause | ||
image: gcr.io/google_containers/pause |
Oops, something went wrong.