Skip to content

Commit 437dfc5

Browse files
authored
Merge pull request #52 from dweomer/prepare-v0.4.0
prepare for v0.4.0
2 parents 0da8696 + 36d625e commit 437dfc5

File tree

6 files changed

+27
-17
lines changed

6 files changed

+27
-17
lines changed

Dockerfile.dapper

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ RUN rm -rf /go/src /go/pkg
2424
RUN if [ "${ARCH}" == "amd64" ]; then \
2525
curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.15.0; \
2626
fi
27+
RUN if [ "${ARCH}" == "amd64" ]; then \
28+
GO111MODULE=on go install sigs.k8s.io/kustomize/kustomize/v3; \
29+
fi
2730
ARG SONOBUOY_VERSION=0.17.2
2831
RUN if [ "${ARCH}" != "arm" ]; then \
2932
set -x; \
3033
curl -sL "https://github.com/vmware-tanzu/sonobuoy/releases/download/v${SONOBUOY_VERSION}/sonobuoy_${SONOBUOY_VERSION}_linux_${ARCH}.tar.gz" \
3134
| tar -xz -C /usr/local/bin; \
3235
chmod +x /usr/local/bin/sonobuoy; \
3336
fi
34-
3537
# ENV DAPPER_RUN_ARGS --privileged
3638
ENV DAPPER_ENV REPO TAG DRONE_TAG
3739
ENV DAPPER_SOURCE /go/src/github.com/rancher/system-upgrade-controller/

examples/ubuntu/docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ services:
2323
- target: /var/lib/rancher
2424
type: volume
2525
- target: /var/lib/rancher/k3s/server/manifests/system-upgrade-controller.yaml
26-
source: ../../manifests/system-upgrade-controller.yaml
26+
source: ../../dist/artifacts/system-upgrade-controller.yaml
2727
type: bind
2828
- target: /var/lib/rancher/k3s/server/manifests/system-upgrade-plans/bionic.yaml
2929
source: ./bionic.yaml
@@ -51,7 +51,7 @@ services:
5151
- target: /var/lib/rancher
5252
type: volume
5353
- target: /var/lib/rancher/k3s/server/manifests/system-upgrade-controller.yaml
54-
source: ../../manifests/system-upgrade-controller.yaml
54+
source: ../../dist/artifacts/system-upgrade-controller.yaml
5555
type: bind
5656
- target: /var/lib/rancher/k3s/server/manifests/system-upgrade-plans/bionic.yaml
5757
source: ./bionic.yaml

kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ resources:
44
- manifests/system-upgrade-controller.yaml
55
images:
66
- name: rancher/system-upgrade-controller
7-
newTag: v0.3.1
7+
newTag: v0.4.0

manifests/system-upgrade-controller.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
apiVersion: v1
32
kind: Namespace
43
metadata:
@@ -32,8 +31,8 @@ data:
3231
SYSTEM_UPGRADE_CONTROLLER_DEBUG: "false"
3332
SYSTEM_UPGRADE_CONTROLLER_THREADS: "2"
3433
SYSTEM_UPGRADE_JOB_ACTIVE_DEADLINE_SECONDS: "900"
35-
SYSTEM_UPGRADE_JOB_BACKOFF_LIMIT: "6"
36-
SYSTEM_UPGRADE_JOB_IMAGE_PULL_POLICY: "IfNotPresent"
34+
SYSTEM_UPGRADE_JOB_BACKOFF_LIMIT: "99"
35+
SYSTEM_UPGRADE_JOB_IMAGE_PULL_POLICY: "Always"
3736
SYSTEM_UPGRADE_JOB_KUBECTL_IMAGE: "rancher/kubectl:v1.17.0"
3837
SYSTEM_UPGRADE_JOB_PRIVILEGED: "true"
3938
SYSTEM_UPGRADE_JOB_TTL_SECONDS_AFTER_FINISH: "900"
@@ -62,7 +61,7 @@ spec:
6261
serviceAccountName: system-upgrade
6362
containers:
6463
- name: system-upgrade-controller
65-
image: rancher/system-upgrade-controller:v0.3.1
64+
image: rancher/system-upgrade-controller:v0.4.0
6665
imagePullPolicy: IfNotPresent
6766
envFrom:
6867
- configMapRef:

scripts/package-controller

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,14 @@ docker image save --output ./dist/artifacts/system-upgrade-controller-${ARCH}.ta
2525
${REPO}/system-upgrade-controller:latest
2626
echo ${REPO}/system-upgrade-controller:${TAG} > ./dist/images.txt
2727
echo Built ${REPO}/system-upgrade-controller:${TAG}
28+
29+
reset-kustomization() {
30+
cp -vf /tmp/kustomization.yaml .
31+
}
32+
33+
if [ "$ARCH" = "amd64" ]; then
34+
cp kustomization.yaml /tmp/
35+
trap reset-kustomization EXIT
36+
kustomize edit set image "rancher/system-upgrade-controller=${REPO}/system-upgrade-controller:${VERSION}"
37+
kustomize build --reorder=none --output ./dist/artifacts/system-upgrade-controller.yaml
38+
fi

scripts/package-e2e-tests

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ docker image save --output ./dist/artifacts/system-upgrade-controller-e2e-tests-
2828
echo ${REPO}/system-upgrade-controller:${TAG}-e2e-tests >> ./dist/images.txt
2929
echo Built ${REPO}/system-upgrade-controller:${TAG}-e2e-tests
3030

31-
if [ "$ARCH" == "arm" ]; then
32-
exit 0
31+
if [ "$ARCH" = "amd64" ]; then
32+
sonobuoy gen plugin \
33+
--format=junit \
34+
--image ${REPO}/system-upgrade-controller:${VERSION}-e2e-tests \
35+
--name system-upgrade-controller \
36+
--type job \
37+
> ./dist/artifacts/system-upgrade-controller-e2e-tests.yaml
3338
fi
34-
35-
sonobuoy gen plugin \
36-
--format=junit \
37-
--image ${REPO}/system-upgrade-controller:${VERSION}-e2e-tests \
38-
--name system-upgrade-controller \
39-
--type job \
40-
> ./dist/artifacts/system-upgrade-controller-e2e-tests.yaml

0 commit comments

Comments
 (0)