Skip to content

Commit 26a01ae

Browse files
authored
Merge branch 'master' into master
2 parents 1e7507e + 6658996 commit 26a01ae

File tree

19 files changed

+318
-35
lines changed

19 files changed

+318
-35
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG]"
5+
labels: kind/bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior
15+
16+
**Expected behavior**
17+
A clear and concise description of what you expected to happen.
18+
19+
**Screenshots**
20+
If applicable, add screenshots to help explain your problem.
21+
22+
**Environment**
23+
- Operator Version:
24+
- Kubernetes/OpenShift Version:
25+
26+
**Additional context**
27+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea/enhancement for this project
4+
title: "[ENHANCE]"
5+
labels: kind/enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/pull_request.yaml

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
env:
99
DOCKER_FILE_PATH: Dockerfile
10+
UBI_DOCKER_FILE_PATH: Dockerfile.ubi
1011
KUBERNETES_VERSION: "1.19.0"
1112
KIND_VERSION: "0.17.0"
1213
REGISTRY: ghcr.io
@@ -82,12 +83,14 @@ jobs:
8283
- name: Test
8384
run: make test
8485

85-
- name: Generate Tag
86+
- name: Generate Tags
8687
id: generate_tag
8788
run: |
8889
sha=${{ github.event.pull_request.head.sha }}
8990
tag="SNAPSHOT-PR-${{ github.event.pull_request.number }}-${sha:0:8}"
91+
ubi_tag="SNAPSHOT-PR-${{ github.event.pull_request.number }}-UBI-${sha:0:8}"
9092
echo "GIT_TAG=$(echo ${tag})" >> $GITHUB_OUTPUT
93+
echo "GIT_UBI_TAG=$(echo ${ubi_tag})" >> $GITHUB_OUTPUT
9194
9295
- name: Set up QEMU
9396
uses: docker/setup-qemu-action@v2
@@ -122,6 +125,25 @@ jobs:
122125
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
123126
org.opencontainers.image.revision=${{ github.sha }}
124127
128+
- name: Build and Push Docker UBI Image to Docker registry
129+
uses: docker/build-push-action@v4
130+
with:
131+
context: .
132+
file: ${{ env.DOCKER_UBI_FILE_PATH }}
133+
pull: true
134+
push: true
135+
build-args: |
136+
BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
137+
BUILDER_IMAGE=${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}
138+
cache-to: type=inline
139+
platforms: linux/amd64,linux/arm64
140+
tags: |
141+
${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_UBI_TAG }}
142+
labels: |
143+
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
144+
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
145+
org.opencontainers.image.revision=${{ github.sha }}
146+
125147
- name: Login to ghcr registry
126148
uses: docker/login-action@v2
127149
with:
@@ -150,13 +172,32 @@ jobs:
150172
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
151173
org.opencontainers.image.revision=${{ github.sha }}
152174
175+
- name: Build and Push Docker UBI Image to ghcr registry
176+
uses: docker/build-push-action@v4
177+
with:
178+
context: .
179+
file: ${{ env.DOCKER_UBI_FILE_PATH }}
180+
pull: true
181+
push: true
182+
build-args: |
183+
BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
184+
BUILDER_IMAGE=ghcr.io/${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}
185+
cache-to: type=inline
186+
platforms: linux/amd64,linux/arm64
187+
tags: |
188+
${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_UBI_TAG }}
189+
labels: |
190+
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
191+
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
192+
org.opencontainers.image.revision=${{ github.sha }}
193+
153194
- name: Comment on PR
154195
uses: mshick/add-pr-comment@v2
155196
if: always()
156197
env:
157198
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
158199
with:
159-
message-success: '@${{ github.actor }} Image is available for testing. `docker pull ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}`'
200+
message-success: '@${{ github.actor }} Images are available for testing. `docker pull ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}`\n`docker pull ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_UBI_TAG }}`'
160201
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!'
161202
allow-repeats: true
162203

.github/workflows/push.yaml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
env:
99
DOCKER_FILE_PATH: Dockerfile
10+
DOCKER_UBI_FILE_PATH: Dockerfile.ubi
1011
KUBERNETES_VERSION: "1.19.0"
1112
KIND_VERSION: "0.17.0"
1213
HELM_REGISTRY_URL: "https://stakater.github.io/stakater-charts"
@@ -111,11 +112,30 @@ jobs:
111112
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
112113
org.opencontainers.image.revision=${{ github.sha }}
113114
115+
- name: Build and Push Docker UBI Image to Docker registry
116+
uses: docker/build-push-action@v4
117+
with:
118+
context: .
119+
file: ${{ env.DOCKER_UBI_FILE_PATH }}
120+
pull: true
121+
push: true
122+
build-args: |
123+
BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
124+
BUILDER_IMAGE=${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.new_tag }}
125+
cache-to: type=inline
126+
platforms: linux/amd64,linux/arm64
127+
tags: |
128+
${{ env.DOCKER_IMAGE_REPOSITORY }}:ubi-${{ steps.generate_tag.outputs.new_tag }}
129+
labels: |
130+
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
131+
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
132+
org.opencontainers.image.revision=${{ github.sha }}
133+
114134
- name: Login to ghcr registry
115135
uses: docker/login-action@v2
116136
with:
117137
registry: ${{env.REGISTRY}}
118-
username: ${{github.actor}}
138+
username: stakater-user
119139
password: ${{secrets.GITHUB_TOKEN}}
120140

121141
- name: Generate image repository path for ghcr registry
@@ -139,6 +159,25 @@ jobs:
139159
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
140160
org.opencontainers.image.revision=${{ github.sha }}
141161
162+
- name: Build and Push Docker UBI Image to ghcr registry
163+
uses: docker/build-push-action@v4
164+
with:
165+
context: .
166+
file: ${{ env.DOCKER_FILE_PATH }}
167+
pull: true
168+
push: true
169+
build-args: |
170+
BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
171+
BUILDER_IMAGE=ghcr.io/${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.new_tag }}
172+
cache-to: type=inline
173+
platforms: linux/amd64,linux/arm64
174+
tags: |
175+
${{ env.GHCR_IMAGE_REPOSITORY }}:ubi-${{ steps.generate_tag.outputs.new_tag }}
176+
labels: |
177+
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
178+
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
179+
org.opencontainers.image.revision=${{ github.sha }}
180+
142181
##############################
143182
## Add steps to generate required artifacts for a release here(helm chart, operator manifest etc.)
144183
##############################

Dockerfile.ubi

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
ARG BUILDER_IMAGE
2+
ARG BASE_IMAGE
3+
4+
FROM --platform=${BUILDPLATFORM} ${BUILDER_IMAGE} as SRC
5+
6+
FROM ${BASE_IMAGE:-registry.access.redhat.com/ubi8/ubi-minimal:latest}
7+
8+
WORKDIR /
9+
COPY --from=SRC /manager .
10+
11+
# Update image
12+
RUN microdnf update
13+
14+
USER 65532:65532
15+
16+
# Port for metrics and probes
17+
EXPOSE 9090
18+
19+
ENTRYPOINT ["/manager"]

deployments/kubernetes/chart/reloader/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
apiVersion: v1
44
name: reloader
55
description: Reloader chart that runs on kubernetes
6-
version: 1.0.41
7-
appVersion: v1.0.41
6+
version: 1.0.46
7+
appVersion: v1.0.46
88
keywords:
99
- Reloader
1010
- kubernetes

deployments/kubernetes/chart/reloader/templates/clusterrole.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,19 @@ rules:
8686
- get
8787
- update
8888
- patch
89+
- apiGroups:
90+
- "batch"
91+
resources:
92+
- cronjobs
93+
verbs:
94+
- list
95+
- get
96+
- apiGroups:
97+
- "batch"
98+
resources:
99+
- jobs
100+
verbs:
101+
- create
89102
{{- if .Values.reloader.enableHA }}
90103
- apiGroups:
91104
- "coordination.k8s.io"

deployments/kubernetes/chart/reloader/templates/networkpolicy.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,19 @@ spec:
2020
{{- end }}
2121
policyTypes:
2222
- Ingress
23+
- Egress
2324
ingress:
2425
- ports:
2526
- port: http
2627
{{- with .Values.reloader.netpol.from}}
2728
from:
2829
{{- toYaml .| nindent 8 }}
2930
{{- end }}
31+
egress:
32+
- ports:
33+
- port: 443
34+
{{- with .Values.reloader.netpol.to}}
35+
to:
36+
{{- toYaml .| nindent 8 }}
37+
{{- end }}
3038
{{- end }}

deployments/kubernetes/chart/reloader/templates/role.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,19 @@ rules:
7777
- get
7878
- update
7979
- patch
80+
- apiGroups:
81+
- "batch"
82+
resources:
83+
- cronjobs
84+
verbs:
85+
- list
86+
- get
87+
- apiGroups:
88+
- "batch"
89+
resources:
90+
- jobs
91+
verbs:
92+
- create
8093
{{- if .Values.reloader.enableHA }}
8194
- apiGroups:
8295
- "coordination.k8s.io"

deployments/kubernetes/chart/reloader/values.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ reloader:
8484
labels:
8585
provider: stakater
8686
group: com.stakater.platform
87-
version: v1.0.41
87+
version: v1.0.46
8888
image:
8989
name: ghcr.io/stakater/reloader
90-
tag: v1.0.41
90+
tag: v1.0.46
9191
pullPolicy: IfNotPresent
9292
# Support for extra environment variables.
9393
env:
@@ -276,5 +276,6 @@ reloader:
276276
# - podSelector:
277277
# matchLabels:
278278
# app.kubernetes.io/name: prometheus
279+
to: []
279280

280281
webhookUrl: ""

0 commit comments

Comments
 (0)