Skip to content

Commit

Permalink
images: switch to ubi9 base
Browse files Browse the repository at this point in the history
  • Loading branch information
apetruhin committed Nov 5, 2024
1 parent cffefa1 commit d78f1bf
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion controller/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
6 changes: 5 additions & 1 deletion controller/cluster_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion controller/coroot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion controller/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d78f1bf

Please sign in to comment.