-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add watch logic for addondeploymentconfig
Signed-off-by: Coleen Iona Quadros <[email protected]>
- Loading branch information
1 parent
4d9d8fd
commit 69642f7
Showing
16 changed files
with
561 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.9.0 | ||
2.10.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Copyright Contributors to the Open Cluster Management project | ||
# Licensed under the Apache License 2.0 | ||
|
||
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder | ||
|
||
WORKDIR /workspace | ||
COPY go.sum go.mod ./ | ||
COPY ./collectors/metrics ./collectors/metrics | ||
COPY ./operators/pkg ./operators/pkg | ||
COPY ./operators/multiclusterobservability/api ./operators/multiclusterobservability/api | ||
RUN CGO_ENABLED=1 go build -a -installsuffix cgo -v -o metrics-collector ./collectors/metrics/cmd/metrics-collector/main.go | ||
|
||
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest | ||
|
||
ARG VCS_REF | ||
ARG VCS_URL | ||
ARG IMAGE_NAME | ||
ARG IMAGE_DESCRIPTION | ||
ARG IMAGE_DISPLAY_NAME | ||
ARG IMAGE_NAME_ARCH | ||
ARG IMAGE_MAINTAINER | ||
ARG IMAGE_VENDOR | ||
ARG IMAGE_VERSION | ||
ARG IMAGE_RELEASE | ||
ARG IMAGE_SUMMARY | ||
ARG IMAGE_OPENSHIFT_TAGS | ||
|
||
LABEL org.label-schema.vendor="Red Hat" \ | ||
org.label-schema.name="$IMAGE_NAME_ARCH" \ | ||
org.label-schema.description="$IMAGE_DESCRIPTION" \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url=$VCS_URL \ | ||
org.label-schema.license="Red Hat Advanced Cluster Management for Kubernetes EULA" \ | ||
org.label-schema.schema-version="1.0" \ | ||
name="$IMAGE_NAME" \ | ||
maintainer="$IMAGE_MAINTAINER" \ | ||
vendor="$IMAGE_VENDOR" \ | ||
version="$IMAGE_VERSION" \ | ||
release="$IMAGE_RELEASE" \ | ||
description="$IMAGE_DESCRIPTION" \ | ||
summary="$IMAGE_SUMMARY" \ | ||
io.k8s.display-name="$IMAGE_DISPLAY_NAME" \ | ||
io.k8s.description="$IMAGE_DESCRIPTION" \ | ||
io.openshift.tags="$IMAGE_OPENSHIFT_TAGS" | ||
|
||
RUN microdnf update &&\ | ||
microdnf install ca-certificates vi --nodocs &&\ | ||
mkdir /licenses &&\ | ||
microdnf clean all | ||
|
||
USER 1001:1001 | ||
|
||
COPY --from=builder /workspace/metrics-collector /usr/bin/ | ||
|
||
# standalone required parameters | ||
ENV FROM_CA_FILE="/from/service-ca.crt" | ||
ENV INTERVAL="60s" | ||
ENV MATCH_FILE="/metrics/match-file" | ||
ENV LIMIT_BYTES=1073741824 | ||
|
||
CMD ["/bin/bash", "-c", "/usr/bin/metrics-collector --from ${FROM} --from-ca-file ${FROM_CA_FILE} --from-token ${FROM_TOKEN} --to-upload ${TO_UPLOAD} --id ${TENANT_ID} --label cluster=${CLUSTER_NAME} --label clusterID=${CLUSTER_ID} --match-file ${MATCH_FILE} --interval ${INTERVAL} --limit-bytes=${LIMIT_BYTES}"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Copyright Contributors to the Open Cluster Management project | ||
# Licensed under the Apache License 2.0 | ||
|
||
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder | ||
|
||
WORKDIR /workspace | ||
COPY go.sum go.mod ./loaders/dashboards ./ | ||
COPY ./loaders/dashboards ./loaders/dashboards | ||
|
||
RUN CGO_ENABLED=1 go build -a -installsuffix cgo -v -o main loaders/dashboards/cmd/main.go | ||
|
||
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest | ||
|
||
ARG VCS_REF | ||
ARG VCS_URL | ||
ARG IMAGE_NAME | ||
ARG IMAGE_DESCRIPTION | ||
ARG IMAGE_DISPLAY_NAME | ||
ARG IMAGE_NAME_ARCH | ||
ARG IMAGE_MAINTAINER | ||
ARG IMAGE_VENDOR | ||
ARG IMAGE_VERSION | ||
ARG IMAGE_RELEASE | ||
ARG IMAGE_SUMMARY | ||
ARG IMAGE_OPENSHIFT_TAGS | ||
|
||
LABEL org.label-schema.vendor="Red Hat" \ | ||
org.label-schema.name="$IMAGE_NAME_ARCH" \ | ||
org.label-schema.description="$IMAGE_DESCRIPTION" \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url=$VCS_URL \ | ||
org.label-schema.license="Red Hat Advanced Cluster Management for Kubernetes EULA" \ | ||
org.label-schema.schema-version="1.0" \ | ||
name="$IMAGE_NAME" \ | ||
maintainer="$IMAGE_MAINTAINER" \ | ||
vendor="$IMAGE_VENDOR" \ | ||
version="$IMAGE_VERSION" \ | ||
release="$IMAGE_RELEASE" \ | ||
description="$IMAGE_DESCRIPTION" \ | ||
summary="$IMAGE_SUMMARY" \ | ||
io.k8s.display-name="$IMAGE_DISPLAY_NAME" \ | ||
io.k8s.description="$IMAGE_DESCRIPTION" \ | ||
io.openshift.tags="$IMAGE_OPENSHIFT_TAGS" | ||
|
||
WORKDIR / | ||
|
||
RUN microdnf update -y && microdnf clean all | ||
|
||
USER 1001:1001 | ||
|
||
COPY --from=builder /workspace/main grafana-dashboard-loader | ||
|
||
EXPOSE 3002 | ||
|
||
ENTRYPOINT ["/grafana-dashboard-loader"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Copyright (c) 2021 Red Hat, Inc. | ||
# Copyright Contributors to the Open Cluster Management project. | ||
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder | ||
|
||
WORKDIR /workspace | ||
COPY go.sum go.mod ./ | ||
COPY ./operators/endpointmetrics ./operators/endpointmetrics | ||
COPY ./operators/multiclusterobservability/api ./operators/multiclusterobservability/api | ||
COPY ./operators/pkg ./operators/pkg | ||
|
||
RUN CGO_ENABLED=1 go build -a -installsuffix cgo -o build/_output/bin/endpoint-monitoring-operator operators/endpointmetrics/main.go | ||
|
||
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest | ||
|
||
ARG VCS_REF | ||
ARG VCS_URL | ||
ARG IMAGE_NAME | ||
ARG IMAGE_DESCRIPTION | ||
ARG IMAGE_DISPLAY_NAME | ||
ARG IMAGE_NAME_ARCH | ||
ARG IMAGE_MAINTAINER | ||
ARG IMAGE_VENDOR | ||
ARG IMAGE_VERSION | ||
ARG IMAGE_RELEASE | ||
ARG IMAGE_SUMMARY | ||
ARG IMAGE_OPENSHIFT_TAGS | ||
|
||
LABEL org.label-schema.vendor="Red Hat" \ | ||
org.label-schema.name="$IMAGE_NAME_ARCH" \ | ||
org.label-schema.description="$IMAGE_DESCRIPTION" \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url=$VCS_URL \ | ||
org.label-schema.license="Red Hat Advanced Cluster Management for Kubernetes EULA" \ | ||
org.label-schema.schema-version="1.0" \ | ||
name="$IMAGE_NAME" \ | ||
maintainer="$IMAGE_MAINTAINER" \ | ||
vendor="$IMAGE_VENDOR" \ | ||
version="$IMAGE_VERSION" \ | ||
release="$IMAGE_RELEASE" \ | ||
description="$IMAGE_DESCRIPTION" \ | ||
summary="$IMAGE_SUMMARY" \ | ||
io.k8s.display-name="$IMAGE_DISPLAY_NAME" \ | ||
io.k8s.description="$IMAGE_DESCRIPTION" \ | ||
io.openshift.tags="$IMAGE_OPENSHIFT_TAGS" | ||
|
||
ENV OPERATOR=/usr/local/bin/endpoint-monitoring-operator \ | ||
USER_UID=1001 \ | ||
USER_NAME=endpoint-monitoring-operator | ||
|
||
RUN microdnf update -y && microdnf clean all | ||
|
||
COPY ./operators/endpointmetrics/manifests /usr/local/manifests | ||
|
||
# install operator binary | ||
COPY --from=builder /workspace/build/_output/bin/endpoint-monitoring-operator ${OPERATOR} | ||
USER ${USER_UID} | ||
|
||
ENTRYPOINT ["/usr/local/bin/endpoint-monitoring-operator"] |
62 changes: 62 additions & 0 deletions
62
operators/multiclusterobservability/Containerfile.operator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Copyright Contributors to the Open Cluster Management project | ||
# Licensed under the Apache License 2.0 | ||
|
||
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder | ||
|
||
WORKDIR /workspace | ||
COPY go.sum go.mod ./ | ||
COPY ./operators/multiclusterobservability ./operators/multiclusterobservability | ||
COPY ./operators/pkg ./operators/pkg | ||
|
||
RUN CGO_ENABLED=1 go build -a -installsuffix cgo -o bin/manager operators/multiclusterobservability/main.go | ||
|
||
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest | ||
|
||
ARG VCS_REF | ||
ARG VCS_URL | ||
ARG IMAGE_NAME | ||
ARG IMAGE_DESCRIPTION | ||
ARG IMAGE_DISPLAY_NAME | ||
ARG IMAGE_NAME_ARCH | ||
ARG IMAGE_MAINTAINER | ||
ARG IMAGE_VENDOR | ||
ARG IMAGE_VERSION | ||
ARG IMAGE_RELEASE | ||
ARG IMAGE_SUMMARY | ||
ARG IMAGE_OPENSHIFT_TAGS | ||
|
||
LABEL org.label-schema.vendor="Red Hat" \ | ||
org.label-schema.name="$IMAGE_NAME_ARCH" \ | ||
org.label-schema.description="$IMAGE_DESCRIPTION" \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url=$VCS_URL \ | ||
org.label-schema.license="Red Hat Advanced Cluster Management for Kubernetes EULA" \ | ||
org.label-schema.schema-version="1.0" \ | ||
name="$IMAGE_NAME" \ | ||
maintainer="$IMAGE_MAINTAINER" \ | ||
vendor="$IMAGE_VENDOR" \ | ||
version="$IMAGE_VERSION" \ | ||
release="$IMAGE_RELEASE" \ | ||
description="$IMAGE_DESCRIPTION" \ | ||
summary="$IMAGE_SUMMARY" \ | ||
io.k8s.display-name="$IMAGE_DISPLAY_NAME" \ | ||
io.k8s.description="$IMAGE_DESCRIPTION" \ | ||
io.openshift.tags="$IMAGE_OPENSHIFT_TAGS" | ||
|
||
ENV OPERATOR=/usr/local/bin/mco-operator \ | ||
USER_UID=1001 \ | ||
USER_NAME=mco | ||
|
||
RUN microdnf update -y && microdnf clean all | ||
|
||
# install templates | ||
COPY ./operators/multiclusterobservability/manifests /usr/local/manifests | ||
|
||
# install the prestop script | ||
COPY ./operators/multiclusterobservability/prestop.sh /usr/local/bin/prestop.sh | ||
|
||
# install operator binary | ||
COPY --from=builder /workspace/bin/manager ${OPERATOR} | ||
USER ${USER_UID} | ||
|
||
ENTRYPOINT ["/usr/local/bin/mco-operator"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.