Skip to content

Commit e060d12

Browse files
lucasrod16claude
andcommitted
Add migration examples and gitignore notes.md
Add launcher-to-kubernetes migration guide with minimal and customized values examples. Ignore local notes.md working files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3c11985 commit e060d12

File tree

4 files changed

+194
-0
lines changed

4 files changed

+194
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ _publish.yml
1818

1919
# helm packages
2020
*.tgz
21+
22+
# local working notes
23+
notes.md
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
category: "Migration"
3+
---
4+
5+
# Migrating from Launcher to native Kubernetes runner
6+
7+
This guide covers migrating Posit Connect helm values from the Launcher (`launcher.enabled: true`) to the native Kubernetes runner (`backends.kubernetes.enabled: true`).
8+
9+
The native runner manages content Jobs and Services directly using standard Kubernetes manifests, replacing the Launcher's template system.
10+
11+
## Minimal migration
12+
13+
If you haven't customized `launcher.templateValues`, the migration requires three changes:
14+
15+
1. Set `launcher.enabled: false` and `backends.kubernetes.enabled: true`.
16+
1. Rename `config.Launcher` to `config.Kubernetes`.
17+
1. Keep `sharedStorage` values as-is.
18+
19+
```{.yaml include="rstudio-connect-minimal-migration.yaml" filename="values.yaml"}
20+
```
21+
22+
## Migrating templateValues customizations
23+
24+
If you customized `launcher.templateValues`, those settings move into `backends.kubernetes.defaultResourceJobBase` and `backends.kubernetes.defaultResourceServiceBase`. These are standard Kubernetes [Job](https://kubernetes.io/docs/concepts/workloads/controllers/job/) and [Service](https://kubernetes.io/docs/concepts/services-networking/service/) specs, so Kubernetes documentation applies directly.
25+
26+
The following example migrates every supported `templateValues` field. Each field is annotated with a `# Was:` comment showing its original path:
27+
28+
```{.yaml include="rstudio-connect-customized-migration.yaml" filename="values.yaml"}
29+
```
30+
31+
## Values with no direct equivalent
32+
33+
| Launcher value | Migration path |
34+
| --- | --- |
35+
| `launcher.customRuntimeYaml` | Use `executionEnvironments` instead. See [Execution Environments](https://docs.posit.co/connect/admin/appendix/off-host/execution-environments/). |
36+
| `launcher.additionalRuntimeImages` | Use `executionEnvironments` instead. |
37+
| `launcher.launcherKubernetesProfilesConf` | No equivalent. The native runner does not use profiles. |
38+
| `launcher.useTemplates`, `extraTemplates`, `includeDefaultTemplates`, `includeTemplateValues` | N/A. The native runner uses resource bases instead of templates. |
39+
40+
## Important notes
41+
42+
:::{.callout-important}
43+
If you set `serviceAccountName` in the job base, you must label the service account for Connect to use it. Without this label, Connect falls back to the namespace default:
44+
45+
```bash
46+
kubectl label sa <service-account-name> connect.posit.co/service-account=true -n <namespace>
47+
```
48+
:::
49+
50+
**Init container** -- The chart auto-generates a `connect-content-init` init container from `backends.kubernetes.defaultInitContainer`. Do not include it in `defaultResourceJobBase`. Custom init containers run alongside the auto-generated one.
51+
52+
**Shared storage** -- `sharedStorage.*` values (`create`, `mount`, `mountContent`, `name`, `subPath`, `storageClassName`) work identically for both modes. No changes needed.
53+
54+
**Rollback** -- Set `launcher.enabled: true`, remove `backends.kubernetes`, and rename `config.Kubernetes` back to `config.Launcher`. Previously published content continues to work.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Migration from Launcher to native Kubernetes runner with templateValues.
2+
# Each field is annotated with its original launcher.templateValues path.
3+
4+
sharedStorage:
5+
create: true
6+
mount: true
7+
storageClassName: nfs-sc-rwx # TODO: Change to your RWX StorageClass
8+
requests:
9+
storage: 100G
10+
11+
launcher:
12+
enabled: false
13+
14+
backends:
15+
kubernetes:
16+
enabled: true
17+
defaultResourceJobBase:
18+
metadata:
19+
labels: # Was: templateValues.job.labels
20+
app.example.com/managed-by: connect
21+
annotations: # Was: templateValues.job.annotations
22+
app.example.com/team: data-science
23+
spec:
24+
template:
25+
metadata:
26+
labels: # Was: templateValues.pod.labels
27+
app.example.com/content: "true"
28+
annotations: # Was: templateValues.pod.annotations
29+
app.example.com/tier: compute
30+
spec:
31+
nodeSelector: # Was: templateValues.pod.nodeSelector
32+
workload: content
33+
tolerations: # Was: templateValues.pod.tolerations
34+
- key: "dedicated"
35+
operator: "Equal"
36+
value: "content"
37+
effect: "NoSchedule"
38+
affinity: # Was: templateValues.pod.affinity
39+
podAntiAffinity:
40+
preferredDuringSchedulingIgnoredDuringExecution:
41+
- weight: 100
42+
podAffinityTerm:
43+
labelSelector:
44+
matchLabels:
45+
app.example.com/content: "true"
46+
topologyKey: kubernetes.io/hostname
47+
securityContext: # Was: templateValues.pod.securityContext and pod.defaultSecurityContext
48+
runAsUser: 999
49+
runAsGroup: 999
50+
fsGroup: 999
51+
serviceAccountName: connect-content-sa # Was: templateValues.pod.serviceAccountName
52+
# NOTE: SA must be labeled: kubectl label sa connect-content-sa connect.posit.co/service-account=true
53+
imagePullSecrets: # Was: templateValues.pod.imagePullSecrets
54+
- name: registry-credentials # TODO: Change to your image pull secret
55+
priorityClassName: "" # Was: templateValues.pod.priorityClassName
56+
hostAliases: # Was: templateValues.pod.hostAliases
57+
- ip: "10.0.0.50"
58+
hostnames:
59+
- "internal-api.example.com"
60+
volumes: # Was: templateValues.pod.volumes
61+
- name: extra-config
62+
configMap:
63+
name: content-config
64+
initContainers: # Was: templateValues.pod.initContainers
65+
# The chart auto-generates connect-content-init; custom init containers run alongside it.
66+
- name: wait-for-db
67+
image: busybox:latest
68+
command: ["sh", "-c", "echo waiting for dependencies"]
69+
containers:
70+
- name: log-forwarder # Was: templateValues.pod.extraContainers
71+
image: fluent/fluent-bit:latest
72+
resources:
73+
requests:
74+
cpu: "50m"
75+
memory: "64Mi"
76+
- name: connect-content # Must use this exact name for the content container
77+
env: # Was: templateValues.pod.env
78+
- name: DATABASE_URL
79+
valueFrom:
80+
secretKeyRef:
81+
name: app-secrets
82+
key: database-url
83+
resources: # Was: templateValues.pod.resources
84+
requests:
85+
memory: "1Gi"
86+
cpu: "500m"
87+
limits:
88+
memory: "4Gi"
89+
cpu: "2"
90+
imagePullPolicy: IfNotPresent # Was: templateValues.pod.imagePullPolicy
91+
securityContext: # Was: templateValues.pod.containerSecurityContext
92+
allowPrivilegeEscalation: false
93+
volumeMounts: # Was: templateValues.pod.volumeMounts
94+
- name: extra-config
95+
mountPath: /etc/content-config
96+
readOnly: true
97+
98+
defaultResourceServiceBase:
99+
metadata:
100+
labels: # Was: templateValues.service.labels
101+
app.example.com/service: content
102+
annotations: # Was: templateValues.service.annotations
103+
app.example.com/tier: compute
104+
spec:
105+
type: ClusterIP # Was: templateValues.service.type
106+
107+
config:
108+
# ... your existing config ...
109+
110+
Kubernetes: # Was: config.Launcher
111+
DataDirPVCName: connect-shared-storage # TODO: Change if you use a custom sharedStorage.name
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Minimal migration from Launcher to native Kubernetes runner.
2+
# Only three changes are needed if you haven't customized templateValues.
3+
4+
# sharedStorage values remain unchanged
5+
sharedStorage:
6+
create: true
7+
mount: true
8+
storageClassName: nfs-sc-rwx # TODO: Change to your RWX StorageClass
9+
requests:
10+
storage: 100G
11+
12+
# 1. Disable the Launcher
13+
launcher:
14+
enabled: false
15+
16+
# 2. Enable the native Kubernetes runner
17+
backends:
18+
kubernetes:
19+
enabled: true
20+
21+
config:
22+
# ... your existing config ...
23+
24+
# 3. Rename config.Launcher to config.Kubernetes
25+
Kubernetes:
26+
DataDirPVCName: connect-shared-storage # TODO: Change if you use a custom sharedStorage.name

0 commit comments

Comments
 (0)