Skip to content

Commit

Permalink
2.17.19
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Banfield-Zanin committed May 23, 2024
1 parent 6a09bf8 commit 0032400
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 48 deletions.
9 changes: 5 additions & 4 deletions Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ RUN mkdir -p /etc/ansible \
&& echo "internal_poll_interval = 0.05" >> /etc/ansible/ansible.cfg \
&& echo 'roles_path = /element.io/roles' >> /etc/ansible/ansible.cfg \
&& echo 'collections_path = /ansible/collections' >> /etc/ansible/ansible.cfg \
&& echo 'library = /usr/share/ansible/openshift' >> /etc/ansible/ansible.cfg
&& echo 'library = /usr/share/ansible/openshift' >> /etc/ansible/ansible.cfg \
&& echo 'home = /.ansible' >> /etc/ansible/ansible.cfg \
&& echo 'local_tmp = /.ansible/tmp' >> /etc/ansible/ansible.cfg

ENV TINI_VERSION=v0.19.0
ENV OPERATOR_SDK_VERSION=1.34.1
Expand Down Expand Up @@ -96,9 +98,8 @@ COPY --from=base-builder /bin/helm /bin/helm
COPY --from=base-builder /required-libs /lib/
COPY --from=base-builder /usr/local/lib /usr/local/lib
COPY --from=base-builder /usr/lib/locale/C.utf8 /usr/lib/locale/C.utf8
COPY --from=base-builder --chown=nonroot:nonroot /element.io /element.io

USER nonroot
COPY --from=base-builder /element.io /element.io
RUN chmod -R 0755 /etc/ansible

WORKDIR /element.io
ENV LC_ALL "C.UTF-8"
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile.operator
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG DISTROLESS_BASE_IMAGE=registry.gitlab.element.io/engineering/ess/operator/el


# We need to run a first build step to remove elementdeployment role
FROM python:3.11-slim-bookworm AS build
FROM python:3.11-slim-bookworm AS build-tmp

COPY LICENSES/operator /element.io/LICENSES
COPY watches.yaml /element.io/watches.yaml
Expand All @@ -26,4 +26,5 @@ FROM $DISTROLESS_BASE_IMAGE as base
ARG GIT_COMMIT=devel
LABEL git_commit=$GIT_COMMIT

COPY --from=build --chown=nonroot:nonroot /element.io /element.io
COPY --from=build-tmp /element.io /element.io
RUN chmod -R 0755 /element.io
13 changes: 7 additions & 6 deletions Dockerfile.updater
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ FROM $DISTROLESS_BASE_IMAGE as base
ARG GIT_COMMIT=devel
LABEL git_commit=$GIT_COMMIT

COPY --chown=nonroot:nonroot LICENSES/updater ${HOME}/element.io/LICENSES
COPY --chown=nonroot:nonroot watches.updater.yaml ${HOME}/element.io/watches.yaml
COPY LICENSES/updater /element.io/LICENSES
COPY watches.updater.yaml /element.io/watches.yaml

COPY --chown=nonroot:nonroot roles/elementdeployment ${HOME}/element.io/roles/elementdeployment/
COPY --chown=nonroot:nonroot roles/teardown ${HOME}/element.io/roles/teardown/
COPY --chown=nonroot:nonroot roles/generic_apply ${HOME}/element.io/roles/generic_apply/
COPY --chown=nonroot:nonroot playbooks/elementdeployment.yml playbooks/any.yml ${HOME}/element.io/playbooks/
COPY roles/elementdeployment /element.io/roles/elementdeployment/
COPY roles/teardown /element.io/roles/teardown/
COPY roles/generic_apply /element.io/roles/generic_apply/
COPY playbooks/elementdeployment.yml playbooks/any.yml /element.io/playbooks/


RUN chmod -R 0755 /element.io
6 changes: 3 additions & 3 deletions conversion/Dockerfile.operator
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 New Vector Ltd
# Copyright 2023-2024 New Vector Ltd
#
# SPDX-License-Identifier: AGPL-3.0-or-later

Expand All @@ -9,14 +9,14 @@ WORKDIR /app
COPY . /app
RUN go mod download
RUN CGO_ENABLED=0 go build -o /app/conversion-webhook cmd/operator/main.go
RUN chmod 755 /app/conversion-webhook

FROM gcr.io/distroless/static-debian12
# Label this image with the repo and commit that built it, for freshmaking purposes.
ARG GIT_COMMIT=devel
LABEL git_commit=$GIT_COMMIT
USER nonroot
WORKDIR /

COPY --from=buildstage --chown=nonroot:nonroot /app/conversion-webhook /
COPY --from=buildstage /app/conversion-webhook /
EXPOSE 8443
ENTRYPOINT ["/conversion-webhook"]
7 changes: 3 additions & 4 deletions conversion/Dockerfile.updater
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 New Vector Ltd
# Copyright 2023-2024 New Vector Ltd
#
# SPDX-License-Identifier: AGPL-3.0-or-later

Expand All @@ -9,16 +9,15 @@ WORKDIR /app
COPY . /app
RUN go mod download
RUN CGO_ENABLED=0 go build -o /app/conversion-webhook cmd/updater/main.go
RUN chmod 755 /app/conversion-webhook

FROM gcr.io/distroless/static-debian12
# Label this image with the repo and commit that built it, for freshmaking purposes.
ARG GIT_COMMIT=devel
LABEL git_commit=$GIT_COMMIT
USER nonroot
WORKDIR /

COPY --from=buildstage --chown=nonroot:nonroot /app/conversion-webhook /
COPY --from=buildstage /app/conversion-webhook /

EXPOSE 8443
USER nonroot
ENTRYPOINT ["/conversion-webhook"]
4 changes: 2 additions & 2 deletions helm/operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.17.18
version: 2.17.19

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 2.17.18
appVersion: 2.17.19
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
- "/bin/sh"
- "-xc"
args:
- rm -rfv /tmp/* /tmp/.* /home/nonroot/.ansible/tmp/* /home/nonroot/.ansible/tmp/.* || true
- rm -rfv /tmp/* /tmp/.* /.ansible/tmp/* /.ansible/tmp/.* || true
env:
{{- include "elementOperator.managerEnv" . | nindent 8 }}
image: '{{ .Values.operator.manager.image.repository }}{{ hasKey .Values.operator.manager.image "digest" | ternary (print "@" .Values.operator.manager.image.digest) (print ":" .Values.operator.manager.image.tag) }}'
Expand All @@ -60,7 +60,7 @@ spec:
volumeMounts:
- mountPath: /tmp
name: manager-tmp
- mountPath: /home/nonroot/.ansible/tmp/
- mountPath: /.ansible/tmp/
name: ansible-tmp
containers:
{{- if $.Values.clusterDeployment }}
Expand Down Expand Up @@ -146,7 +146,7 @@ spec:
volumeMounts:
- mountPath: /tmp
name: manager-tmp
- mountPath: /home/nonroot/.ansible/tmp/
- mountPath: /.ansible/tmp/
name: ansible-tmp
serviceAccountName: '{{ include "elementOperator.controllerManagerFullname" . }}'
terminationGracePeriodSeconds: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
- "/bin/sh"
- "-xc"
args:
- rm -rfv /tmp/* /tmp/.* /home/nonroot/.ansible/tmp/* /home/nonroot/.ansible/tmp/.* || true
- rm -rfv /tmp/* /tmp/.* /.ansible/tmp/* /.ansible/tmp/.* || true
env:
{{- include "elementOperator.managerEnv" . | nindent 8 }}
image: '{{ .Values.operator.manager.image.repository }}{{ hasKey .Values.operator.manager.image "digest" | ternary (print "@" .Values.operator.manager.image.digest) (print ":" .Values.operator.manager.image.tag) }}'
Expand All @@ -61,7 +61,7 @@ spec:
volumeMounts:
- mountPath: /tmp
name: manager-tmp
- mountPath: /home/nonroot/.ansible/tmp/
- mountPath: /.ansible/tmp/
name: ansible-tmp
containers:
{{- if $.Values.clusterDeployment }}
Expand Down Expand Up @@ -147,7 +147,7 @@ spec:
volumeMounts:
- mountPath: /tmp
name: manager-tmp
- mountPath: /home/nonroot/.ansible/tmp/
- mountPath: /.ansible/tmp/
name: ansible-tmp
serviceAccountName: '{{ include "elementOperator.controllerManagerFullname" . }}'
terminationGracePeriodSeconds: 10
Expand Down
12 changes: 6 additions & 6 deletions helm/operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ crds:
extraPodSpec:
securityContext:
runAsNonRoot: true
runAsUser: 65532
fsGroup: 65532
runAsUser: 65200
fsGroup: 65200
extraContainerSpec:
securityContext:
allowPrivilegeEscalation: false
Expand All @@ -34,14 +34,14 @@ crds:
imagePullPolicy: Always
image:
repository: docker.io/vectorim/ess-core-operator-conversion-webhook
tag: 2.17.18
tag: 2.17.19

operator:
extraPodSpec:
securityContext:
runAsNonRoot: true
runAsUser: 65532
fsGroup: 65532
runAsUser: 65200
fsGroup: 65200
manager:
# maxConcurrentReconciles should be a factor of the memory limit
# as a rule of thumb, each reconciles need ~256Mi at peak
Expand Down Expand Up @@ -69,7 +69,7 @@ operator:
imagePullPolicy: Always
image:
repository: docker.io/vectorim/ess-core-operator
tag: 2.17.18
tag: 2.17.19

rbacProxy:
resources:
Expand Down
4 changes: 2 additions & 2 deletions helm/updater/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.17.18
version: 2.17.19

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 2.17.18
appVersion: 2.17.19
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
- "/bin/sh"
- "-xc"
args:
- rm -rfv /tmp/* /tmp/.* /home/nonroot/.ansible/tmp/* /home/nonroot/.ansible/tmp/.* || true
- rm -rfv /tmp/* /tmp/.* /.ansible/tmp/* /.ansible/tmp/.* || true
env:
{{- include "elementUpdater.managerEnv" . | nindent 8 }}
image: '{{ .Values.updater.manager.image.repository }}{{ hasKey .Values.updater.manager.image "digest" | ternary (print "@" .Values.updater.manager.image.digest) (print ":" .Values.updater.manager.image.tag) }}'
Expand All @@ -61,7 +61,7 @@ spec:
volumeMounts:
- mountPath: /tmp
name: manager-tmp
- mountPath: /home/nonroot/.ansible/tmp/
- mountPath: /.ansible/tmp/
name: ansible-tmp
containers:
{{- if $.Values.clusterDeployment }}
Expand Down Expand Up @@ -146,9 +146,9 @@ spec:
volumeMounts:
- mountPath: /tmp
name: manager-tmp
- mountPath: /home/nonroot/.ansible/tmp/
- mountPath: /.ansible/tmp/
name: ansible-tmp
- mountPath: /home/nonroot/.ansible_async
- mountPath: /.ansible_async
name: ansible-async
serviceAccountName: '{{ include "elementUpdater.controllerManagerFullname" . }}'
terminationGracePeriodSeconds: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
- "/bin/sh"
- "-xc"
args:
- rm -rfv /tmp/* /tmp/.* /home/nonroot/.ansible/tmp/* /home/nonroot/.ansible/tmp/.* || true
- rm -rfv /tmp/* /tmp/.* /.ansible/tmp/* /.ansible/tmp/.* || true
env:
{{- include "elementUpdater.managerEnv" . | nindent 8 }}
image: '{{ .Values.updater.manager.image.repository }}{{ hasKey .Values.updater.manager.image "digest" | ternary (print "@" .Values.updater.manager.image.digest) (print ":" .Values.updater.manager.image.tag) }}'
Expand All @@ -62,7 +62,7 @@ spec:
volumeMounts:
- mountPath: /tmp
name: manager-tmp
- mountPath: /home/nonroot/.ansible/tmp/
- mountPath: /.ansible/tmp/
name: ansible-tmp
containers:
{{- if $.Values.clusterDeployment }}
Expand Down Expand Up @@ -147,9 +147,9 @@ spec:
volumeMounts:
- mountPath: /tmp
name: manager-tmp
- mountPath: /home/nonroot/.ansible/tmp/
- mountPath: /.ansible/tmp/
name: ansible-tmp
- mountPath: /home/nonroot/.ansible_async
- mountPath: /.ansible_async
name: ansible-async
serviceAccountName: '{{ include "elementUpdater.controllerManagerFullname" . }}'
terminationGracePeriodSeconds: 10
Expand Down
8 changes: 4 additions & 4 deletions helm/updater/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ crds:
imagePullPolicy: Always
image:
repository: docker.io/vectorim/ess-core-updater-conversion-webhook
tag: 2.17.18
tag: 2.17.19

updater:
extraPodSpec:
securityContext:
runAsNonRoot: true
runAsUser: 65532
fsGroup: 65532
runAsUser: 65201
fsGroup: 65201
manager:
# maxConcurrentReconciles should be a factor of the memory limit
# as a rule of thumb, each reconciles need ~256Mi at peak
Expand Down Expand Up @@ -69,7 +69,7 @@ updater:
- ALL
image:
repository: docker.io/vectorim/ess-core-updater
tag: 2.17.18
tag: 2.17.19

rbacProxy:
resources:
Expand Down
2 changes: 1 addition & 1 deletion roles/synapse/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
_project: >-
{{
query('k8s',
api_version="v1",
api_version="project.openshift.io/v1",
kind="Project",
resource_name=ansible_operator_meta.namespace,
)
Expand Down

0 comments on commit 0032400

Please sign in to comment.