Skip to content

Commit 4e85738

Browse files
authored
reduce unnecessary content
Updated chart name and annotation for installer-only resources. Removed outdated section on container image handling in airgap bundles.
1 parent 1a1dd04 commit 4e85738

File tree

1 file changed

+3
-106
lines changed

1 file changed

+3
-106
lines changed

docs/partials/helm/_helmchart-installer-only-annotation.mdx

Lines changed: 3 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ HelmChart custom resources are Replicated-specific and never deployed by Helm CL
3939
apiVersion: kots.io/v1beta2
4040
kind: HelmChart
4141
metadata:
42-
name: kots-only-chart
42+
name: installers-only-chart
4343
annotations:
4444
kots.io/installer-only: "true"
4545
spec:
4646
chart:
47-
name: kots-only-chart
47+
name: installers-only-chart
4848
chartVersion: 1.0.0
4949
```
5050
@@ -68,113 +68,10 @@ spec:
6868
- name: preflight-checks
6969
image: replicated/preflight:latest
7070
command: ["/bin/sh"]
71-
args: ["-c", "echo Running Replicated-specific preflight checks"]
71+
args: ["-c", "echo Running installer-specific preflight checks"]
7272
restartPolicy: Never
7373
```
7474

7575
**Why the annotation is needed:** Without it, this Job would run during both Helm CLI and Replicated installer deployments. The annotation ensures it only runs with Replicated installers where the preflight tooling is available.
7676

7777
**Standalone manifests:** If this Job were a standalone manifest in your release (not inside a Helm chart), it would automatically be excluded from Helm CLI installations without needing the annotation.
78-
79-
### Container Image Handling in Airgap Bundles
80-
81-
When determining which container images to include in Helm airgap bundles, the system uses intelligent many-to-many tracking. An image is **only excluded from Helm airgap bundles if ALL resources that reference it are marked as installer-only**.
82-
83-
**Example scenarios:**
84-
85-
| Scenario | Result | Why |
86-
|----------|--------|-----|
87-
| Image referenced only by installer-only resources | Excluded from Helm | All sources are installer-only |
88-
| Image referenced by installer-only AND regular resources | Included in Helm | At least one source is not installer-only |
89-
| Image referenced by multiple installer-only resources | Excluded from Helm | All sources are installer-only |
90-
91-
**Example:**
92-
93-
```yaml
94-
# In your-chart/templates/cache.yaml
95-
apiVersion: apps/v1
96-
kind: StatefulSet
97-
metadata:
98-
name: installer-cache
99-
annotations:
100-
kots.io/installer-only: "true"
101-
spec:
102-
template:
103-
spec:
104-
containers:
105-
- image: redis:7.2 # Still in Helm airgap if used elsewhere
106-
---
107-
# In your-chart/templates/app-cache.yaml
108-
apiVersion: apps/v1
109-
kind: Deployment
110-
metadata:
111-
name: app-cache
112-
# No annotation - regular deployment
113-
spec:
114-
template:
115-
spec:
116-
containers:
117-
- image: redis:7.2 # Same image, non-installer-only source
118-
```
119-
120-
In this example, `redis:7.2` is **included in Helm airgap bundles** because it's referenced by the `app-cache` Deployment which is NOT marked as installer-only, even though it's also used by an installer-only StatefulSet.
121-
122-
### Common Use Cases
123-
124-
**1. Preflight Checks and Validation**
125-
126-
Jobs that perform Replicated-specific preflight checks or validation:
127-
128-
```yaml
129-
# Inside your-chart/templates/preflight.yaml
130-
apiVersion: batch/v1
131-
kind: Job
132-
metadata:
133-
name: preflight-validator
134-
annotations:
135-
kots.io/installer-only: "true"
136-
```
137-
138-
**2. KOTS Admin Console Dependencies**
139-
140-
Charts or resources needed to support the KOTS Admin Console:
141-
142-
```yaml
143-
apiVersion: kots.io/v1beta2
144-
kind: HelmChart
145-
metadata:
146-
name: kots-postgres
147-
annotations:
148-
kots.io/installer-only: "true"
149-
spec:
150-
chart:
151-
name: postgresql
152-
```
153-
154-
**3. Database Migration Jobs**
155-
156-
Migration scripts that run during Replicated installer upgrades:
157-
158-
```yaml
159-
# Inside your-chart/templates/migrations.yaml
160-
apiVersion: batch/v1
161-
kind: Job
162-
metadata:
163-
name: db-migration
164-
annotations:
165-
kots.io/installer-only: "true"
166-
```
167-
168-
**4. Cluster Preparation**
169-
170-
DaemonSets or init containers that prepare the cluster environment:
171-
172-
```yaml
173-
# Inside your-chart/templates/cluster-prep.yaml
174-
apiVersion: apps/v1
175-
kind: DaemonSet
176-
metadata:
177-
name: node-configurator
178-
annotations:
179-
kots.io/installer-only: "true"
180-
```

0 commit comments

Comments
 (0)