Skip to content

Commit

Permalink
Merge branch 'master' into feature/cronjob_trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
Stef Graces committed Sep 29, 2023
2 parents 3e7cc40 + f436935 commit 697923a
Show file tree
Hide file tree
Showing 25 changed files with 292 additions and 502 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:

env:
DOCKER_FILE_PATH: Dockerfile
KUBERNETES_VERSION: "1.18.0"
KIND_VERSION: "0.10.0"
KUBERNETES_VERSION: "1.19.0"
KIND_VERSION: "0.17.0"
REGISTRY: ghcr.io

jobs:
qa:
uses: stakater/.github/.github/workflows/[email protected].44
uses: stakater/.github/.github/workflows/[email protected].46
with:
MD_CONFIG: .github/md_config.json
DOC_SRC: README.md docs
Expand All @@ -24,7 +24,7 @@ jobs:
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.sha}}

Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message-success: '@${{ github.actor }} Image is available for testing. `docker pull ghcr.io/${{ env.IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}`'
message-success: '@${{ github.actor }} Image is available for testing. `docker pull ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}`'
message-failure: '@${{ github.actor }} Yikes! You better fix it before anyone else finds out! [Build](https://github.com/${{ github.repository }}/commit/${{ github.event.pull_request.head.sha }}/checks) has Failed!'
allow-repeats: true

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:

env:
DOCKER_FILE_PATH: Dockerfile
KUBERNETES_VERSION: "1.18.0"
KIND_VERSION: "0.10.0"
KUBERNETES_VERSION: "1.19.0"
KIND_VERSION: "0.17.0"
HELM_REGISTRY_URL: "https://stakater.github.io/stakater-charts"
REGISTRY: ghcr.io

Expand All @@ -20,7 +20,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.STAKATER_GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:

- name: Generate Tag
id: generate_tag
uses: anothrNick/github-tag-action@1.61.0
uses: anothrNick/github-tag-action@1.67.0
env:
GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
WITH_V: true
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
# Generate tag for operator without "v"
- name: Generate Operator Tag
id: generate_operator_tag
uses: anothrNick/github-tag-action@1.61.0
uses: anothrNick/github-tag-action@1.67.0
env:
GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
WITH_V: false
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
branch: ${{ github.ref }}

- name: Push Latest Tag
uses: anothrNick/github-tag-action@1.61.0
uses: anothrNick/github-tag-action@1.67.0
env:
GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
WITH_V: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/

Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ _gopath/
.vscode
vendor
dist
Reloader
Reloader
!**/chart/reloader
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG BUILDER_IMAGE
ARG BASE_IMAGE

# Build the manager binary
FROM --platform=${BUILDPLATFORM} ${BUILDER_IMAGE:-golang:1.20.6} as builder
FROM --platform=${BUILDPLATFORM} ${BUILDER_IMAGE:-golang:1.21.0} as builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Contact [`[email protected]`](mailto:[email protected]) for info about Reloade

## Compatibility

Reloader is compatible with Kubernetes >= 1.9
Reloader is compatible with Kubernetes >= 1.19

## How to use Reloader

Expand Down Expand Up @@ -87,6 +87,10 @@ not.
We can also specify a specific configmap or secret which would trigger rolling upgrade only upon change in our specified configmap or secret, this way, it will not trigger rolling upgrade upon changes in all configmaps or secrets used in a `deploymentconfig`, `deployment`, `daemonset`, `statefulset` or `rollout`.
To do this either set the auto annotation to `"false"` (`reloader.stakater.com/auto: "false"`) or remove it altogether, and use annotations for [Configmap](.#Configmap) or [Secret](.#Secret).
It's also possible to enable auto reloading for all resources, by setting the `--auto-reload-all` flag.
In this case, all resources that do not have the auto annotation set to `"false"`, will be reloaded automatically when their ConfigMaps or Secrets are updated.
Notice that setting the auto annotation to an undefined value counts as false as-well.

### Configmap

To perform rolling upgrade when change happens only on specific configmaps use below annotation.
Expand Down
4 changes: 2 additions & 2 deletions deployments/kubernetes/chart/reloader/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
apiVersion: v1
name: reloader
description: Reloader chart that runs on kubernetes
version: 1.0.32
appVersion: v1.0.32
version: 1.0.41
appVersion: v1.0.41
keywords:
- Reloader
- kubernetes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ spec:
- mountPath: /tmp/
name: tmp-volume
{{- end }}
{{- if or (.Values.reloader.logFormat) (.Values.reloader.ignoreSecrets) (.Values.reloader.ignoreNamespaces) (.Values.reloader.namespaceSelector) (.Values.reloader.resourceLabelSelector) (.Values.reloader.ignoreConfigMaps) (.Values.reloader.custom_annotations) (eq .Values.reloader.isArgoRollouts true) (eq .Values.reloader.reloadOnCreate true) (ne .Values.reloader.reloadStrategy "default") (.Values.reloader.enableHA)}}
{{- if or (.Values.reloader.logFormat) (.Values.reloader.ignoreSecrets) (.Values.reloader.ignoreNamespaces) (.Values.reloader.namespaceSelector) (.Values.reloader.resourceLabelSelector) (.Values.reloader.ignoreConfigMaps) (.Values.reloader.custom_annotations) (eq .Values.reloader.isArgoRollouts true) (eq .Values.reloader.reloadOnCreate true) (ne .Values.reloader.reloadStrategy "default") (.Values.reloader.enableHA) (.Values.reloader.autoReloadAll)}}
args:
{{- if .Values.reloader.logFormat }}
- "--log-format={{ .Values.reloader.logFormat }}"
Expand Down Expand Up @@ -206,6 +206,10 @@ spec:
- "--search-match-annotation"
- "{{ .Values.reloader.custom_annotations.match }}"
{{- end }}
{{- if .Values.reloader.webhookUrl }}
- "--webhook-url"
- "{{ .Values.reloader.webhookUrl }}"
{{- end }}
{{- end }}
{{- if eq .Values.reloader.isArgoRollouts true }}
- "--is-Argo-Rollouts={{ .Values.reloader.isArgoRollouts }}"
Expand All @@ -222,6 +226,9 @@ spec:
{{- if or (gt (int .Values.reloader.deployment.replicas) 1) (.Values.reloader.enableHA) }}
- "--enable-ha=true"
{{- end}}
{{- if eq .Values.reloader.autoReloadAll true }}
- "--auto-reload-all=true"
{{- end -}}
{{- end }}
{{- if .Values.reloader.deployment.resources }}
resources:
Expand Down
30 changes: 30 additions & 0 deletions deployments/kubernetes/chart/reloader/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{- if and ( .Values.reloader.netpol.enabled ) }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
annotations:
{{ include "reloader-helm3.annotations" . | indent 4 }}
labels:
{{ include "reloader-labels.chart" . | indent 4 }}
{{- if .Values.reloader.matchLabels }}
{{ toYaml .Values.reloader.matchLabels | indent 4 }}
{{- end }}
name: {{ template "reloader-fullname" . }}
spec:
podSelector:
matchLabels:
app: {{ template "reloader-fullname" . }}
release: {{ .Release.Name | quote }}
{{- if .Values.reloader.matchLabels }}
{{ toYaml .Values.reloader.matchLabels | indent 6 }}
{{- end }}
policyTypes:
- Ingress
ingress:
- ports:
- port: http
{{- with .Values.reloader.netpol.from}}
from:
{{- toYaml .| nindent 8 }}
{{- end }}
{{- end }}
14 changes: 12 additions & 2 deletions deployments/kubernetes/chart/reloader/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ nameOverride: ""
fullnameOverride: ""

reloader:
autoReloadAll: false
isArgoRollouts: false
isOpenshift: false
ignoreSecrets: false
Expand Down Expand Up @@ -83,10 +84,10 @@ reloader:
labels:
provider: stakater
group: com.stakater.platform
version: v1.0.32
version: v1.0.41
image:
name: ghcr.io/stakater/reloader
tag: v1.0.32
tag: v1.0.41
pullPolicy: IfNotPresent
# Support for extra environment variables.
env:
Expand Down Expand Up @@ -268,3 +269,12 @@ reloader:
enabled: false
# Set the minimum available replicas
# minAvailable: 1

netpol:
enabled: false
from: []
# - podSelector:
# matchLabels:
# app.kubernetes.io/name: prometheus

webhookUrl: ""
2 changes: 1 addition & 1 deletion deployments/kubernetes/manifests/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.32"
chart: "reloader-1.0.41"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
Expand Down
2 changes: 1 addition & 1 deletion deployments/kubernetes/manifests/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.32"
chart: "reloader-1.0.41"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
Expand Down
10 changes: 5 additions & 5 deletions deployments/kubernetes/manifests/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ metadata:
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.32"
chart: "reloader-1.0.41"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
group: com.stakater.platform
provider: stakater
version: v1.0.32
version: v1.0.41
name: reloader-reloader
namespace: default
spec:
Expand All @@ -28,16 +28,16 @@ spec:
metadata:
labels:
app: reloader-reloader
chart: "reloader-1.0.32"
chart: "reloader-1.0.41"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
group: com.stakater.platform
provider: stakater
version: v1.0.32
version: v1.0.41
spec:
containers:
- image: "ghcr.io/stakater/reloader:v1.0.32"
- image: "ghcr.io/stakater/reloader:v1.0.41"
imagePullPolicy: IfNotPresent
name: reloader-reloader

Expand Down
2 changes: 1 addition & 1 deletion deployments/kubernetes/manifests/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.32"
chart: "reloader-1.0.41"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
Expand Down
16 changes: 8 additions & 8 deletions deployments/kubernetes/reloader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.32"
chart: "reloader-1.0.41"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
Expand All @@ -25,7 +25,7 @@ metadata:
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.32"
chart: "reloader-1.0.41"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
Expand Down Expand Up @@ -79,7 +79,7 @@ metadata:
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.32"
chart: "reloader-1.0.41"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
Expand All @@ -102,13 +102,13 @@ metadata:
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-1.0.32"
chart: "reloader-1.0.41"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
group: com.stakater.platform
provider: stakater
version: v1.0.32
version: v1.0.41
name: reloader-reloader
namespace: default
spec:
Expand All @@ -122,16 +122,16 @@ spec:
metadata:
labels:
app: reloader-reloader
chart: "reloader-1.0.32"
chart: "reloader-1.0.41"
release: "reloader"
heritage: "Helm"
app.kubernetes.io/managed-by: "Helm"
group: com.stakater.platform
provider: stakater
version: v1.0.32
version: v1.0.41
spec:
containers:
- image: "ghcr.io/stakater/reloader:v1.0.32"
- image: "ghcr.io/stakater/reloader:v1.0.41"
imagePullPolicy: IfNotPresent
name: reloader-reloader

Expand Down
2 changes: 2 additions & 0 deletions deployments/kubernetes/templates/chart/values.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,5 @@ reloader:
# labels:
# Set timeout for scrape
# timeout: 10s

webhookUrl: ""
Loading

0 comments on commit 697923a

Please sign in to comment.