Skip to content

Commit c51c68a

Browse files
authored
Revert "argocd-agent: update addon with reverse proxy and redis proxy enable. use secrets instead of mounting ca,jwt,tls keys (open-cluster-management-io#53)" (open-cluster-management-io#66)
This reverts commit e88f330. Signed-off-by: Mike Ng <ming@redhat.com>
1 parent 74a73b1 commit c51c68a

7 files changed

Lines changed: 7 additions & 243 deletions

File tree

argocd-agent-addon/charts/argocd-agent-addon/templates/agent-addon/agent-redis-secret.yaml

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

argocd-agent-addon/charts/argocd-agent-addon/templates/agent-addon/argocd-agent-addon-template.yaml

Lines changed: 2 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -127,71 +127,12 @@ spec:
127127
name: argocd-agent-params
128128
key: agent.creds
129129
optional: true
130-
- name: ARGOCD_AGENT_TLS_SECRET_NAME
131-
valueFrom:
132-
configMapKeyRef:
133-
name: argocd-agent-params
134-
key: agent.tls.secret-name
135-
optional: true
136-
- name: ARGOCD_AGENT_TLS_ROOT_CA_SECRET_NAME
137-
valueFrom:
138-
configMapKeyRef:
139-
name: argocd-agent-params
140-
key: agent.tls.root-ca-secret-name
141-
optional: true
142-
- name: ARGOCD_AGENT_METRICS_PORT
143-
valueFrom:
144-
configMapKeyRef:
145-
name: argocd-agent-params
146-
key: agent.metrics.port
147-
optional: true
148-
- name: ARGOCD_AGENT_HEALTH_CHECK_PORT
149-
valueFrom:
150-
configMapKeyRef:
151-
name: argocd-agent-params
152-
key: agent.healthz.port
153-
optional: true
154-
- name: REDIS_ADDR
155-
valueFrom:
156-
configMapKeyRef:
157-
name: argocd-agent-params
158-
key: agent.redis.address
159-
optional: true
160-
{{- if .Values.agent.redis.secretName }}
161-
- name: REDIS_USERNAME
162-
valueFrom:
163-
secretKeyRef:
164-
name: {{ .Values.agent.redis.secretName }}
165-
key: username
166-
optional: true
167-
- name: REDIS_PASSWORD
168-
valueFrom:
169-
secretKeyRef:
170-
name: {{ .Values.agent.redis.secretName }}
171-
key: password
172-
optional: true
173-
{{- else }}
174-
- name: REDIS_USERNAME
175-
valueFrom:
176-
configMapKeyRef:
177-
name: argocd-agent-params
178-
key: agent.redis.username
179-
optional: true
180-
- name: REDIS_PASSWORD
181-
valueFrom:
182-
configMapKeyRef:
183-
name: argocd-agent-params
184-
key: agent.redis.password
185-
optional: true
186-
{{- end }}
187130
image: {{ .Values.global.imageOverrides.argocdAgentImage }}
188131
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
189132
name: argocd-agent-agent
190133
ports:
191-
- containerPort: 8181
134+
- containerPort: 8000
192135
name: metrics
193-
- containerPort: 8002
194-
name: healthz
195136
securityContext:
196137
capabilities:
197138
drop:
@@ -221,7 +162,7 @@ spec:
221162
secret:
222163
secretName: argocd-agent-ca
223164
items:
224-
- key: tls.crt
165+
- key: ca.crt
225166
path: ca.crt
226167
optional: true
227168
- apiVersion: v1
@@ -233,20 +174,13 @@ spec:
233174
agent.mode: {{ .Values.agent.mode | quote }}
234175
agent.creds: "mtls:open-cluster-management:cluster:([^:]+):addon:argocd-agent"
235176
agent.tls.client.insecure: "false"
236-
agent.tls.secret-name: "argocd-agent-client-tls"
237-
agent.tls.root-ca-secret-name: "argocd-agent-ca"
238177
agent.tls.root-ca-path: "/app/config/ca/ca.crt"
239178
agent.tls.client.cert-path: "/app/config/tls/tls.crt"
240179
agent.tls.client.key-path: "/app/config/tls/tls.key"
241180
agent.log.level: "info"
242181
agent.namespace: "argocd"
243182
agent.server.address: {{ .Values.agent.principal.server.address | quote }}
244183
agent.server.port: {{ .Values.agent.principal.server.port | quote }}
245-
agent.metrics.port: "8181"
246-
agent.healthz.port: "8002"
247-
agent.redis.address: {{ .Values.agent.principal.redis.address | default "argocd-redis:6379" | quote }}
248-
agent.redis.username: {{ .Values.agent.redis.username | default "" | quote }}
249-
agent.redis.password: {{ .Values.agent.redis.password | default "" | quote }}
250184
- apiVersion: rbac.authorization.k8s.io/v1
251185
kind: RoleBinding
252186
metadata:

argocd-agent-addon/charts/argocd-agent-addon/templates/principal/principal-deployment.yaml

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
- principal
2424
env:
2525
- name: ARGOCD_PRINCIPAL_ENABLE_RESOURCE_PROXY
26-
value: "true"
26+
value: "false"
2727
- name: ARGOCD_PRINCIPAL_LISTEN_HOST
2828
valueFrom:
2929
configMapKeyRef:
@@ -54,12 +54,6 @@ spec:
5454
name: argocd-agent-params
5555
key: principal.metrics.enabled
5656
optional: true
57-
- name: ARGOCD_PRINCIPAL_HEALTH_CHECK_PORT
58-
valueFrom:
59-
configMapKeyRef:
60-
name: argocd-agent-params
61-
key: principal.healthz.port
62-
optional: true
6357
- name: ARGOCD_PRINCIPAL_NAMESPACE
6458
valueFrom:
6559
configMapKeyRef:
@@ -90,12 +84,6 @@ spec:
9084
name: argocd-agent-params
9185
key: principal.namespace-create.labels
9286
optional: true
93-
- name: ARGOCD_PRINCIPAL_TLS_SECRET_NAME
94-
valueFrom:
95-
configMapKeyRef:
96-
name: argocd-agent-params
97-
key: principal.tls.secret-name
98-
optional: true
9987
- name: ARGOCD_PRINCIPAL_TLS_SERVER_CERT_PATH
10088
valueFrom:
10189
configMapKeyRef:
@@ -120,12 +108,6 @@ spec:
120108
name: argocd-agent-params
121109
key: principal.tls.client-cert.require
122110
optional: true
123-
- name: ARGOCD_PRINCIPAL_TLS_SERVER_ROOT_CA_SECRET_NAME
124-
valueFrom:
125-
configMapKeyRef:
126-
name: argocd-agent-params
127-
key: principal.tls.server.root-ca-secret-name
128-
optional: true
129111
- name: ARGOCD_PRINCIPAL_TLS_SERVER_ROOT_CA_PATH
130112
valueFrom:
131113
configMapKeyRef:
@@ -138,48 +120,12 @@ spec:
138120
name: argocd-agent-params
139121
key: principal.tls.client-cert.match-subject
140122
optional: true
141-
- name: ARGOCD_PRINCIPAL_RESOURCE_PROXY_SECRET_NAME
142-
valueFrom:
143-
configMapKeyRef:
144-
name: argocd-agent-params
145-
key: principal.resource-proxy.secret-name
146-
optional: true
147-
- name: ARGOCD_PRINCIPAL_RESOURCE_PROXY_TLS_CERT_PATH
148-
valueFrom:
149-
configMapKeyRef:
150-
name: argocd-agent-params
151-
key: principal.resource-proxy.tls.cert-path
152-
optional: true
153-
- name: ARGOCD_PRINCIPAL_RESOURCE_PROXY_TLS_KEY_PATH
154-
valueFrom:
155-
configMapKeyRef:
156-
name: argocd-agent-params
157-
key: principal.resource-proxy.tls.key-path
158-
optional: true
159-
- name: ARGOCD_PRINCIPAL_RESOURCE_PROXY_CA_SECRET_NAME
160-
valueFrom:
161-
configMapKeyRef:
162-
name: argocd-agent-params
163-
key: principal.resource-proxy.ca.secret-name
164-
optional: true
165-
- name: ARGOCD_PRINCIPAL_RESOURCE_PROXY_CA_PATH
166-
valueFrom:
167-
configMapKeyRef:
168-
name: argocd-agent-params
169-
key: principal.resource-proxy.ca.path
170-
optional: true
171123
- name: ARGOCD_PRINCIPAL_JWT_ALLOW_GENERATE
172124
valueFrom:
173125
configMapKeyRef:
174126
name: argocd-agent-params
175127
key: principal.jwt.allow-generate
176128
optional: true
177-
- name: ARGOCD_PRINCIPAL_JWT_SECRET_NAME
178-
valueFrom:
179-
configMapKeyRef:
180-
name: argocd-agent-params
181-
key: principal.jwt.secret-name
182-
optional: true
183129
- name: ARGOCD_PRINCIPAL_JWT_KEY_PATH
184130
valueFrom:
185131
configMapKeyRef:
@@ -192,18 +138,6 @@ spec:
192138
name: argocd-agent-params
193139
key: principal.auth
194140
optional: true
195-
- name: ARGOCD_PRINCIPAL_REDIS_SERVER_ADDRESS
196-
valueFrom:
197-
configMapKeyRef:
198-
name: argocd-agent-params
199-
key: principal.redis.server.address
200-
optional: true
201-
- name: ARGOCD_PRINCIPAL_REDIS_COMPRESSION_TYPE
202-
valueFrom:
203-
configMapKeyRef:
204-
name: argocd-agent-params
205-
key: principal.redis.compression.type
206-
optional: true
207141
image: {{ .Values.global.imageOverrides.argocdAgentImage }}
208142
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
209143
name: argocd-agent-principal
@@ -212,8 +146,6 @@ spec:
212146
name: principal
213147
- containerPort: 8000
214148
name: metrics
215-
- containerPort: 8003
216-
name: healthz
217149
securityContext:
218150
capabilities:
219151
drop:
@@ -238,7 +170,6 @@ spec:
238170
items:
239171
- key: jwt.key
240172
path: jwt.key
241-
optional: true
242173
- name: tls-secret
243174
secret:
244175
secretName: argocd-agent-tls
@@ -247,11 +178,9 @@ spec:
247178
path: tls.key
248179
- key: tls.crt
249180
path: tls.crt
250-
optional: true
251181
- name: ca-secret
252182
secret:
253183
secretName: argocd-agent-ca
254184
items:
255185
- key: tls.crt
256186
path: ca.crt
257-
optional: true

argocd-agent-addon/charts/argocd-agent-addon/templates/principal/principal-healthz-service.yaml

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

argocd-agent-addon/charts/argocd-agent-addon/templates/principal/principal-metrics-service.yaml

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

argocd-agent-addon/charts/argocd-agent-addon/templates/principal/principal-params-cm.yaml

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ data:
2020
principal.metrics.port: "8000"
2121
# principal.metrics.enabled: Whether the metrics server should be started.
2222
principal.metrics.enabled: "true"
23-
# principal.healthz.port: The port the health check server should listen on.
24-
# Default: 8003
25-
principal.healthz.port: "8003"
2623
# principal.namespace: The namespace the principal will operate in. If left
2724
# blank, the namespace where the pod is running in will be used.
2825
# Default: ""
@@ -46,9 +43,6 @@ data:
4643
# "key=value". Empty values are not allowed. Multiple labels can be given
4744
# as a comma separated list, e.g. "foo=bar,bar=baz"
4845
principal.namespace-create.labels: ""
49-
# principal.tls.secret-name: The name of the secret containing the TLS certificate and key.
50-
# Default: "argocd-agent-principal-tls"
51-
principal.tls.secret-name: "argocd-agent-principal-tls"
5246
# principal.tls.server.cert-path: Path to the TLS certificate to be used by
5347
# the gRPC server.
5448
# Default: ""
@@ -62,49 +56,23 @@ data:
6256
# configured. This is insecure. Do only use for development.
6357
# Default: false
6458
principal.tls.server.allow-generate: "false"
65-
# principal.tls.client-cert.require: Whether to require client certs from
66-
# agents upon connection.
67-
# Default: false
68-
principal.tls.client-cert.require: "true"
69-
# principal.tls.server.root-ca-secret-name: The name of the secret containing the root CA TLS certificate.
70-
# Default: "argocd-agent-ca"
71-
principal.tls.server.root-ca-secret-name: "argocd-agent-ca"
7259
# principal.tls.server.root-ca-path: Path to a TLS root certificate authority
7360
# to be used to validate agent's client certificates against.
7461
# Default: ""
7562
principal.tls.server.root-ca-path: "/app/config/ca/ca.crt"
63+
# principal.tls.client-cert.require: Whether to require client certs from
64+
# agents upon connection.
65+
# Default: false
66+
principal.tls.client-cert.require: "true"
7667
# principal.tls.client-cert.match-subject: Whether to match the subject field
7768
# in a client certificate presented by an agent to the agent's name.
7869
# Default: false
7970
principal.tls.client-cert.match-subject: "false"
80-
# principal.resource-proxy.secret-name: The name of the secret containing
81-
# the TLS certificate and key for the resource proxy.
82-
# Default: "argocd-agent-resource-proxy-tls"
83-
principal.resource-proxy.secret-name: "argocd-agent-resource-proxy-tls"
84-
# principal.resource-proxy.tls.cert-path: Path to the TLS certificate to be used by
85-
# the resource proxy.
86-
# Default: ""
87-
principal.resource-proxy.tls.cert-path: ""
88-
# principal.resource-proxy.tls.key-path: Path to the TLS private key to be used by
89-
# the resource proxy.
90-
# Default: ""
91-
principal.resource-proxy.tls.key-path: ""
92-
# principal.resource-proxy.ca.secret-name: The name of the secret containing
93-
# the CA certificate for the resource proxy.
94-
# Default: "argocd-agent-ca"
95-
principal.resource-proxy.ca.secret-name: "argocd-agent-ca"
96-
# principal.resource-proxy.ca.path: Path to the CA certificate to be used by
97-
# the resource proxy.
98-
# Default: ""
99-
principal.resource-proxy.ca.path: ""
10071
# principal.jwt.allow-generate: Whether to allow the principal to generate
10172
# its own private key for signing JWT tokens. This is insecure. Do only use
10273
# for development.
10374
# Default: false
10475
principal.jwt.allow-generate: "false"
105-
# principal.jwt.secret-name: The name of the secret containing the JWT signing key.
106-
# Default: "argocd-agent-jwt"
107-
principal.jwt.secret-name: "argocd-agent-jwt"
10876
# principal.jwt.key-path: Path to the private key to be used for signing JWT
10977
# tokens.
11078
principal.jwt.key-path: "/app/config/jwt/jwt.key"
@@ -117,9 +85,3 @@ data:
11785
# extracting the agent ID from client cert subject.
11886
# Default: userpass:_path_to_encrypted_creds_
11987
principal.auth: "mtls:open-cluster-management:cluster:([^:]+):addon:argocd-agent"
120-
# principal.redis.server.address: Redis server hostname and port (e.g. argocd-redis:6379).
121-
# Default: "argocd-redis:6379"
122-
principal.redis.server.address: {{ .Values.agent.principal.redis.address | default "argocd-redis:6379" | quote }}
123-
# principal.redis.compression.type: Compression algorithm required by Redis. (possible values: gzip, none. Default value: gzip)
124-
# Default: "gzip"
125-
principal.redis.compression.type: {{ .Values.agent.principal.redis.compressionType | default "gzip" | quote }}

0 commit comments

Comments
 (0)