mirror of
https://github.com/stakater/Reloader.git
synced 2026-08-23 22:16:45 +00:00
setup for reloader chart 3.0.0-beta.1
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
apiVersion: v2
|
||||
name: reloader-v2
|
||||
name: reloader
|
||||
description: Reloader chart that runs on kubernetes
|
||||
version: 2.0.0
|
||||
appVersion: v2.0.0
|
||||
version: 3.0.0-beta.1
|
||||
appVersion: v2.0.0-beta.1
|
||||
keywords:
|
||||
- Reloader
|
||||
- kubernetes
|
||||
|
||||
@@ -4,19 +4,28 @@ If you have configured helm on your cluster, you can add Reloader to helm from o
|
||||
|
||||
## Installation
|
||||
|
||||
> **Reloader v2 is currently a prerelease.** The commands below resolve to the
|
||||
> latest *stable* chart, which is still Reloader v1. To install the v2 beta you
|
||||
> must opt in explicitly, because Helm skips prerelease versions by default:
|
||||
>
|
||||
> ```bash
|
||||
> # --devel picks up the newest prerelease; add --version to pin a specific beta
|
||||
> helm install {{RELEASE_NAME}} stakater/reloader --devel
|
||||
> ```
|
||||
|
||||
```bash
|
||||
# Add stakater helm repoository
|
||||
helm repo add stakater https://stakater.github.io/stakater-charts
|
||||
|
||||
helm repo update
|
||||
|
||||
helm install stakater/reloader-v2 # For helm3 add --generate-name flag or set the release name
|
||||
helm install stakater/reloader # For helm3 add --generate-name flag or set the release name
|
||||
|
||||
helm install {{RELEASE_NAME}} stakater/reloader-v2 -n {{NAMESPACE}} --set reloader.watchGlobally=false # By default, Reloader watches in all namespaces. To watch in single namespace, set watchGlobally=false
|
||||
helm install {{RELEASE_NAME}} stakater/reloader -n {{NAMESPACE}} --set reloader.watchGlobally=false # By default, Reloader watches in all namespaces. To watch in single namespace, set watchGlobally=false
|
||||
|
||||
helm install stakater/reloader-v2 --set reloader.watchGlobally=false --namespace test --generate-name # Install Reloader in `test` namespace which will only watch `Deployments`, `Daemonsets` `Statefulsets` and `Rollouts` in `test` namespace.
|
||||
helm install stakater/reloader --set reloader.watchGlobally=false --namespace test --generate-name # Install Reloader in `test` namespace which will only watch `Deployments`, `Daemonsets` `Statefulsets` and `Rollouts` in `test` namespace.
|
||||
|
||||
helm install stakater/reloader-v2 --set reloader.ignoreJobs=true --set reloader.ignoreCronJobs=true --generate-name # Install Reloader ignoring Jobs and CronJobs from reload monitoring
|
||||
helm install stakater/reloader --set reloader.ignoreJobs=true --set reloader.ignoreCronJobs=true --generate-name # Install Reloader ignoring Jobs and CronJobs from reload monitoring
|
||||
```
|
||||
|
||||
## Uninstalling
|
||||
@@ -39,7 +48,7 @@ helm uninstall {{RELEASE_NAME}} -n {{NAMESPACE}}
|
||||
| ------------------ | ---------------------------------------- | ------ | ----------------- |
|
||||
| `nameOverride` | replace the name of the chart | string | `""` |
|
||||
| `fullnameOverride` | replace the generated name | string | `""` |
|
||||
| `image` | Set container image name, tag and policy | map | `see values.yaml` |
|
||||
| `image` | Set container image name, tag and policy. `image.tag` defaults to the chart `appVersion` when empty | map | `see values.yaml` |
|
||||
|
||||
### Core Reloader Parameters
|
||||
|
||||
|
||||
@@ -80,13 +80,14 @@ spec:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
{{- $imageTag := .Values.image.tag | default .Chart.AppVersion }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
- image: "{{ .Values.global.imageRegistry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}"
|
||||
- image: "{{ .Values.global.imageRegistry }}/{{ .Values.image.name }}:{{ $imageTag }}"
|
||||
{{- else }}
|
||||
{{- if .Values.image.digest }}
|
||||
- image: "{{ .Values.image.repository }}@{{ .Values.image.digest }}"
|
||||
{{- else }}
|
||||
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
- image: "{{ .Values.image.repository }}:{{ $imageTag }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
|
||||
@@ -2,21 +2,41 @@ suite: Enterprise image swap
|
||||
templates:
|
||||
- deployment.yaml
|
||||
tests:
|
||||
# Tag is asserted by pattern, not literal, so a release bump does not churn tests.
|
||||
- it: uses the community image by default
|
||||
asserts:
|
||||
- matchRegex:
|
||||
path: spec.template.spec.containers[0].image
|
||||
pattern: ^ghcr\.io/stakater/reloader:v[0-9]+\.[0-9]+\.[0-9]+
|
||||
# An empty image.tag must fall back to Chart.yaml appVersion, never render "repo:".
|
||||
- it: falls back to the chart appVersion when image.tag is empty
|
||||
set:
|
||||
image:
|
||||
tag: ""
|
||||
asserts:
|
||||
- matchRegex:
|
||||
path: spec.template.spec.containers[0].image
|
||||
pattern: ^ghcr\.io/stakater/reloader:v[0-9]+\.[0-9]+\.[0-9]+
|
||||
- it: prefers an explicit image.tag over the chart appVersion
|
||||
set:
|
||||
image:
|
||||
tag: pinned-tag
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].image
|
||||
value: ghcr.io/stakater/reloader:v2.0.0
|
||||
value: ghcr.io/stakater/reloader:pinned-tag
|
||||
# The operator image is swapped manually via image.*; enterprise.enabled only
|
||||
# toggles the subchart and must NOT change the operator image on its own.
|
||||
- it: enterprise.enabled alone does not change the operator image
|
||||
set:
|
||||
enterprise:
|
||||
enabled: true
|
||||
image:
|
||||
tag: pinned-tag
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].image
|
||||
value: ghcr.io/stakater/reloader:v2.0.0
|
||||
value: ghcr.io/stakater/reloader:pinned-tag
|
||||
- it: uses the enterprise image when the image block is overridden
|
||||
set:
|
||||
image:
|
||||
|
||||
@@ -82,7 +82,7 @@ tests:
|
||||
of: RoleBinding
|
||||
- equal:
|
||||
path: roleRef.name
|
||||
value: reloader-reloader-v2-role
|
||||
value: reloader-reloader-role
|
||||
- equal:
|
||||
path: subjects[0].namespace
|
||||
value: reloader-ns
|
||||
@@ -97,7 +97,7 @@ tests:
|
||||
template: role.yaml
|
||||
documentSelector:
|
||||
path: metadata.name
|
||||
value: reloader-reloader-v2-metadata-role
|
||||
value: reloader-reloader-metadata-role
|
||||
asserts:
|
||||
- equal:
|
||||
path: metadata.namespace
|
||||
@@ -119,7 +119,7 @@ tests:
|
||||
template: role.yaml
|
||||
documentSelector:
|
||||
path: metadata.name
|
||||
value: reloader-reloader-v2-metadata-role
|
||||
value: reloader-reloader-metadata-role
|
||||
asserts:
|
||||
- contains:
|
||||
path: rules
|
||||
@@ -143,7 +143,7 @@ tests:
|
||||
template: role.yaml
|
||||
documentSelector:
|
||||
path: metadata.name
|
||||
value: reloader-reloader-v2-metadata-role
|
||||
value: reloader-reloader-metadata-role
|
||||
asserts:
|
||||
- notContains:
|
||||
path: rules
|
||||
@@ -194,7 +194,7 @@ tests:
|
||||
template: role.yaml
|
||||
- equal:
|
||||
path: metadata.name
|
||||
value: reloader-reloader-v2-metadata-role
|
||||
value: reloader-reloader-metadata-role
|
||||
template: role.yaml
|
||||
documentIndex: 0
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@ fullnameOverride: ""
|
||||
image:
|
||||
name: stakater/reloader
|
||||
repository: ghcr.io/stakater/reloader
|
||||
tag: v2.0.0
|
||||
# Defaults to Chart.yaml appVersion, so a release only needs to bump appVersion.
|
||||
tag: ""
|
||||
# digest: sha256:1234567
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
|
||||
Reference in New Issue
Block a user