diff --git a/Dockerfile b/Dockerfile index 09df4f2..2d142c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,9 +11,17 @@ COPY controller/ controller/ RUN CGO_ENABLED=0 go build -a -o coroot-operator main.go -FROM gcr.io/distroless/static:nonroot +FROM registry.access.redhat.com/ubi9/ubi + +ARG VERSION=unknown +LABEL name="coroot-operator" \ + vendor="Coroot, Inc." \ + version=${VERSION} \ + summary="Coroot Operator." + +COPY LICENSE /licenses/LICENSE + WORKDIR / COPY --from=builder /workspace/coroot-operator /usr/bin/coroot-operator USER 65534:65534 - ENTRYPOINT ["coroot-operator"] diff --git a/PROJECT b/PROJECT index ea6e908..f41529f 100644 --- a/PROJECT +++ b/PROJECT @@ -6,7 +6,7 @@ domain: coroot.com layout: - go.kubebuilder.io/v4 projectName: coroot-operator -repo: github.io/coroot/operator +repo: github.io/coroot/coroot-operator resources: - api: crdVersion: v1 diff --git a/controller/clickhouse.go b/controller/clickhouse.go index 1a5932e..3d23ed2 100644 --- a/controller/clickhouse.go +++ b/controller/clickhouse.go @@ -13,7 +13,7 @@ import ( ) const ( - ClickhouseImage = "clickhouse/clickhouse-server:24.8.4" + ClickhouseImage = "ghcr.io/coroot/clickhouse:24.8.4-ubi9-0" ClickhouseKeeperReplicas = 3 ) diff --git a/controller/cluster_agent.go b/controller/cluster_agent.go index abee796..9265e94 100644 --- a/controller/cluster_agent.go +++ b/controller/cluster_agent.go @@ -9,6 +9,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +const ( + KubeStateMetricsImage = "ghcr.io/coroot/kube-state-metrics:2.13.0-ubi9-0" +) + func (r *CorootReconciler) clusterAgentServiceAccount(cr *corootv1.Coroot) *corev1.ServiceAccount { a := &corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ @@ -129,7 +133,7 @@ func (r *CorootReconciler) clusterAgentDeployment(cr *corootv1.Coroot) *appsv1.D Env: env, }, { - Image: "registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.13.0", + Image: KubeStateMetricsImage, Name: "kube-state-metrics", Args: []string{ "--host=127.0.0.1", diff --git a/controller/coroot.go b/controller/coroot.go index e3e9d97..84e6bdd 100644 --- a/controller/coroot.go +++ b/controller/coroot.go @@ -60,7 +60,7 @@ func (r *CorootReconciler) corootDeployment(cr *corootv1.Coroot) *appsv1.Deploym env := []corev1.EnvVar{ {Name: "BOOTSTRAP_REFRESH_INTERVAL", Value: refreshInterval}, {Name: "BOOTSTRAP_PROMETHEUS_URL", Value: fmt.Sprintf("http://%s-prometheus.%s:9090", cr.Name, cr.Namespace)}, - {Name: "DO_NOT_CHECK_FOR_UPDATES"}, + {Name: "DO_NOT_CHECK_FOR_UPDATES", Value: "1"}, {Name: "INSTALLATION_TYPE", Value: "k8s-operator"}, } if cr.Spec.CacheTTL.Duration > 0 { diff --git a/controller/prometheus.go b/controller/prometheus.go index a672028..0029013 100644 --- a/controller/prometheus.go +++ b/controller/prometheus.go @@ -11,7 +11,7 @@ import ( ) const ( - PrometheusImage = "prom/prometheus:v2.54.1" + PrometheusImage = "ghcr.io/coroot/prometheus:2.54.1-ubi9-0" ) func (r *CorootReconciler) prometheusService(cr *corootv1.Coroot) *corev1.Service {