Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a basic secretConfig value #132

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions charts/rstudio-connect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ The Helm `config` values are converted into the `rstudio-connect.gcfg` service c
| replicas | int | `1` | The number of replica pods to maintain for this service |
| resources.limits | object | `{"cpu":"2000m","enabled":false,"ephemeralStorage":"200Mi","memory":"2Gi"}` | Defines resource limits for the rstudio-connect pod |
| resources.requests | object | `{"cpu":"100m","enabled":false,"ephemeralStorage":"100Mi","memory":"1Gi"}` | Defines resource requests for the rstudio-connect pod |
| secretConfig | object | [RStudio Connect Configuration Reference](https://docs.rstudio.com/connect/admin/appendix/configuration/) | A nested map of maps that generates the rstudio-connect-secret.gcfg file |
| securityContext | object | `{"privileged":true}` | Values to set the `securityContext` for Connect pods. It must include "privileged: true" or "CAP_SYS_ADMIN" when launcher is not enabled. If launcher is enabled, this can be removed with `securityContext: null` |
| service.annotations | object | `{}` | Annotations that will be added onto the service |
| service.nodePort | bool | `false` | The nodePort to use when using service type NodePort. If not provided, Kubernetes will provide one automatically |
Expand Down
8 changes: 8 additions & 0 deletions charts/rstudio-connect/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ spec:
- name: rstudio-connect-config
mountPath: "/etc/rstudio-connect/rstudio-connect.gcfg"
subPath: "rstudio-connect.gcfg"
- name: rstudio-connect-secret-config
mountPath: "/etc/rstudio-connect/rstudio-connect-secret.gcfg"
subPath: "rstudio-connect-secret.gcfg"
{{- if .Values.launcher.enabled }}
- name: rstudio-connect-config
mountPath: "/etc/rstudio-connect/runtime.yaml"
Expand Down Expand Up @@ -164,6 +167,11 @@ spec:
- name: rstudio-connect-config
configMap:
name: {{ include "rstudio-connect.fullname" . }}-config
{{- if .Values.secretConfig }}
- name: rstudio-connect-secret-config
secret:
secretName: {{ include "rstudio-connect.fullname" . }}-secret-config
{{- end }}
{{- if or .Values.sharedStorage.create .Values.sharedStorage.mount }}
- name: rstudio-connect-data
persistentVolumeClaim:
Expand Down
11 changes: 11 additions & 0 deletions charts/rstudio-connect/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if .Values.secretConfig }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "rstudio-connect.fullname" . }}-secret-config
namespace: {{ $.Release.Namespace }}
type: Opaque
stringData:
secret.gcfg: |
{{- include "rstudio-library.config.gcfg" . | nindent 4 }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/rstudio-connect/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,7 @@ config:
GraphiteHost: 127.0.0.1
GraphitePort: 9109
GraphiteClientId: rsconnect

# -- A nested map of maps that generates the rstudio-connect-secret.gcfg file
# @default -- [RStudio Connect Configuration Reference](https://docs.rstudio.com/connect/admin/appendix/configuration/)
secretConfig: {}