Skip to content

Commit 6c6d532

Browse files
committed
[GITOPS-9258]: Configurable TLS server settings for argocd and argocd-agent components
Signed-off-by: akhil nittala <nakhil@redhat.com>
1 parent 6a7df94 commit 6c6d532

9 files changed

Lines changed: 711 additions & 394 deletions

File tree

Dockerfile

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
11
# Build the manager binary
2-
FROM --platform=linux/amd64 golang:1.25 AS builder
2+
FROM golang:1.25 as builder
33

44
WORKDIR /workspace
5-
6-
COPY argocd-operator /workspace/argocd-operator
7-
85
# Copy the Go Modules manifests
96
COPY go.mod go.mod
107
COPY go.sum go.sum
11-
12-
# Cache dependencies
8+
# cache deps before building and copying source so that we don't need to re-download as much
9+
# and so that source changes don't invalidate our downloaded layer
1310
RUN go mod download
1411

15-
# Copy the Go source
12+
# Copy the go source
1613
COPY cmd/main.go cmd/main.go
1714
COPY api/ api/
1815
COPY controllers/ controllers/
1916
COPY common/ common/
2017
COPY version/ version/
2118

22-
# Build explicitly for linux/amd64
23-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager ./cmd/main.go
24-
25-
# Use distroless as minimal base image
26-
FROM --platform=linux/amd64 gcr.io/distroless/static:nonroot
19+
# Build - Use TARGETARCH to build for the correct architecture
20+
ARG TARGETARCH
21+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o manager ./cmd/main.go
2722

23+
# Use distroless as minimal base image to package the manager binary
24+
# Refer to https://github.com/GoogleContainerTools/distroless for more details
25+
FROM gcr.io/distroless/static:nonroot
2826
WORKDIR /
29-
3027
COPY --from=builder /workspace/manager /usr/local/bin/manager
3128

32-
# Install redis artifacts
29+
# install redis artifacts
3330
COPY build/redis /var/lib/redis
3431

3532
USER 65532:65532

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
183183
CLUSTER_SCOPED_ARGO_ROLLOUTS_NAMESPACES=argo-rollouts,test-rom-ns-1,rom-ns-1,openshift-gitops ARGOCD_CLUSTER_CONFIG_NAMESPACES="openshift-gitops, argocd-e2e-cluster-config, argocd-test-impersonation-1-046, argocd-agent-principal-1-051, argocd-agent-agent-1-052, appset-argocd, appset-old-ns, appset-new-ns, ns-hosting-principal, ns-hosting-managed-agent, ns-hosting-autonomous-agent, appset-argocd-clusterrole" REDIS_CONFIG_PATH="build/redis" go run ./cmd/main.go
184184

185185
.PHONY: docker-build
186-
docker-build: ## Build container image with the manager.
186+
docker-build: test ## Build container image with the manager.
187187
$(CONTAINER_RUNTIME) build --platform=linux/amd64 -t ${IMG} .
188188

189189
.PHONY: docker-push

bundle/manifests/argoproj.io_argocds.yaml

Lines changed: 589 additions & 22 deletions
Large diffs are not rendered by default.

bundle/manifests/gitops-operator.clusterserviceversion.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ metadata:
190190
capabilities: Deep Insights
191191
console.openshift.io/plugins: '["gitops-plugin"]'
192192
containerImage: quay.io/redhat-developer/gitops-operator
193-
createdAt: "2026-04-24T14:56:46Z"
193+
createdAt: "2026-05-21T11:46:26Z"
194194
description: Enables teams to adopt GitOps principles for managing cluster configurations
195195
and application delivery across hybrid multi-cluster Kubernetes environments.
196196
features.operators.openshift.io/disconnected: "true"
@@ -589,6 +589,7 @@ spec:
589589
- apiGroups:
590590
- config.openshift.io
591591
resources:
592+
- apiservers
592593
- authentications
593594
- clusterversions
594595
- ingresses

config/crd/bases/argoproj.io_argocdexports.yaml

Lines changed: 0 additions & 285 deletions
This file was deleted.

config/crd/bases/argoproj.io_argocds.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,6 +1314,15 @@ spec:
13141314
description: Sharding contains the options for the Application
13151315
Controller sharding configuration.
13161316
properties:
1317+
algorithm:
1318+
description: DistributionAlgorithm determines what algorithm
1319+
will be used for distribution of shards. Valid options are
1320+
legacy, round-robin, and consistent-hashing
1321+
enum:
1322+
- legacy
1323+
- round-robin
1324+
- consistent-hashing
1325+
type: string
13171326
clustersPerShard:
13181327
description: ClustersPerShard defines the maximum number of
13191328
clusters managed by each argocd shard
@@ -12195,6 +12204,10 @@ spec:
1219512204
- "1.3"
1219612205
type: string
1219712206
type: object
12207+
x-kubernetes-validations:
12208+
- message: minVersion must be less than or equal to maxVersion
12209+
rule: '!has(self.minVersion) || !has(self.maxVersion)
12210+
|| self.minVersion <= self.maxVersion'
1219812211
type: object
1219912212
type: object
1220012213
type: object
@@ -12233,6 +12246,7 @@ spec:
1223312246
CmdParams specifies command-line parameters for the Argo CD components.
1223412247
The only keys currently supported for this parameter are:
1223512248
- controller.resource.health.persist
12249+
- applicationsetcontroller.enable.tokenref.strict.mode — when ApplicationSet-in-any-namespace is active, the operator defaults this to "true"
1223612250
type: object
1223712251
configManagementPlugins:
1223812252
description: 'Deprecated: ConfigManagementPlugins field is no longer
@@ -14063,6 +14077,15 @@ spec:
1406314077
description: Sharding contains the options for the Application
1406414078
Controller sharding configuration.
1406514079
properties:
14080+
algorithm:
14081+
description: DistributionAlgorithm determines what algorithm
14082+
will be used for distribution of shards. Valid options are
14083+
legacy, round-robin, and consistent-hashing
14084+
enum:
14085+
- legacy
14086+
- round-robin
14087+
- consistent-hashing
14088+
type: string
1406614089
clustersPerShard:
1406714090
description: ClustersPerShard defines the maximum number of
1406814091
clusters managed by each argocd shard
@@ -18198,6 +18221,10 @@ spec:
1819818221
- "1.3"
1819918222
type: string
1820018223
type: object
18224+
x-kubernetes-validations:
18225+
- message: minVersion must be less than or equal to maxVersion
18226+
rule: '!has(self.minVersion) || !has(self.maxVersion) || self.minVersion
18227+
<= self.maxVersion'
1820118228
required:
1820218229
- enabled
1820318230
type: object
@@ -18984,6 +19011,10 @@ spec:
1898419011
- "1.3"
1898519012
type: string
1898619013
type: object
19014+
x-kubernetes-validations:
19015+
- message: minVersion must be less than or equal to maxVersion
19016+
rule: '!has(self.minVersion) || !has(self.maxVersion) || self.minVersion
19017+
<= self.maxVersion'
1898719018
version:
1898819019
description: Version is the Redis container image tag.
1898919020
type: string
@@ -22590,6 +22621,10 @@ spec:
2259022621
- "1.3"
2259122622
type: string
2259222623
type: object
22624+
x-kubernetes-validations:
22625+
- message: minVersion must be less than or equal to maxVersion
22626+
rule: '!has(self.minVersion) || !has(self.maxVersion) || self.minVersion
22627+
<= self.maxVersion'
2259322628
verifytls:
2259422629
description: VerifyTLS defines whether repo server API should
2259522630
be accessed using strict TLS validation
@@ -28292,6 +28327,10 @@ spec:
2829228327
- "1.3"
2829328328
type: string
2829428329
type: object
28330+
x-kubernetes-validations:
28331+
- message: minVersion must be less than or equal to maxVersion
28332+
rule: '!has(self.minVersion) || !has(self.maxVersion) || self.minVersion
28333+
<= self.maxVersion'
2829528334
volumeMounts:
2829628335
description: VolumeMounts adds volumeMounts to the Argo CD Server
2829728336
container.

config/manager/kustomization.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
1212
kind: Kustomization
1313
images:
1414
- name: controller
15-
newName: quay.io/nittalaakhil/openshift-gitops-operator
16-
newTag: v0.0.38
15+
newName: quay.io/redhat-developer/gitops-operator

0 commit comments

Comments
 (0)