Skip to content

Commit

Permalink
fix: [CDS-87155]: Fix Configs for BYOA (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
mankrit-singh authored Jan 11, 2024
1 parent 106f9d3 commit 8fa77a1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 31 deletions.
15 changes: 6 additions & 9 deletions templates/gitops-agent/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
apiVersion: v1
data:
GITOPS_ACCOUNT_IDENTIFIER: {{ .Values.harness.identity.accountId }}
GITOPS_AGENT_IDENTIFIER: {{ .Values.harness.identity.agentId }}
{{- if ne .Values.harness.identity.orgId "" }}
GITOPS_ORG_IDENTIFIER: {{ .Values.harness.identity.orgId }}
GITOPS_ACCOUNT_IDENTIFIER: {{ .Values.harness.identity.accountIdentifier }}
GITOPS_AGENT_IDENTIFIER: {{ .Values.harness.identity.agentIdentifier }}
{{- if ne .Values.harness.identity.orgIdentifier "" }}
GITOPS_ORG_IDENTIFIER: {{ .Values.harness.identity.orgIdentifier }}
{{- end }}
{{- if ne .Values.harness.identity.projectId "" }}
GITOPS_PROJECT_IDENTIFIER: {{ .Values.harness.identity.projectId }}
{{- if ne .Values.harness.identity.projectIdentifier "" }}
GITOPS_PROJECT_IDENTIFIER: {{ .Values.harness.identity.projectIdentifier }}
{{- end }}
{{- if .Values.harness.disasterRecovery.enabled }}
GITOPS_DISASTER_RECOVERY_IDENTIFIER: {{ .Values.harness.disasterRecovery.identifier }}
{{- end }}
GITOPS_SERVICE_HTTP_TLS_ENABLED: "{{ .Values.harness.configMap.http.tlsEnabled }}"
GITOPS_SERVICE_HTTP_CERT_FILES: {{ .Values.harness.configMap.http.certPath }}
AGENT_HTTP_TARGET: {{ .Values.harness.configMap.http.agentHttpTarget }}
AGENT_GRPC_TARGET: {{ .Values.harness.configMap.grpc.agentGrpcTarget }}
AGENT_GRPC_AUTHORITY: {{ .Values.harness.configMap.grpc.agentGrpcAuthority }}
GITOPS_SERVICE_GRPC_INSECURE: "{{ .Values.harness.configMap.grpc.serviceGrpcInsecure }}"
GITOPS_SERVICE_PROTOCOL: {{ .Values.harness.configMap.agentProtocol }}
GITOPS_AGENT_ENABLE_RECONCILE: "{{ .Values.harness.configMap.reconcile.enabled }}"
GITOPS_AGENT_RECONCILE_INTERVAL: "{{ .Values.harness.configMap.reconcile.interval }}"
Expand Down
4 changes: 0 additions & 4 deletions templates/gitops-agent/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ metadata:
labels:
{{- include "harness.labels" (dict "context" . "component" .Values.agent.name "name" .Values.agent.name) | nindent 4 }}
spec:
{{- with include "argo-cd.strategy" (mergeOverwrite .Values.agent.deploymentStrategy) }}
strategy:
{{- trim . | nindent 4 }}
{{- end }}
{{- if not .Values.agent.autoscaling.enabled }}
replicas: {{ .Values.agent.replicas }}
{{- end }}
Expand Down
3 changes: 1 addition & 2 deletions templates/gitops-agent/metrics.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{{- $argo := (index .Values "argo-cd") -}}
{{- if .Values.agent.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ ".Values.agent.name" }}-metrics
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "harness.labels" (dict "context" . "component" $argo.agent.name "name" (printf "%s-metrics" .Values.agent.name)) | nindent 4 }}
{{- include "harness.labels" (dict "context" . "component" .Values.agent.name "name" (printf "%s-metrics" .Values.agent.name)) | nindent 4 }}
{{- with .Values.agent.metrics.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand Down
24 changes: 8 additions & 16 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,27 +195,23 @@ harness:
## Harness specific identity data
identity:
# -- Account Identifier
accountId: ""
accountIdentifier: ""

# -- Organization Identifier
orgId: ""
orgIdentifier: ""

# -- Project Identifier
projectId: ""
projectIdentifier: ""

# -- Agent Identifier
agentId: ""
agentIdentifier: ""

configMap:
agentProtocol : "HTTP1"
http:
tlsEnabled: false
certPath: "/tmp/ca.bundle"
agentHttpTarget: ""
grpc:
agentGrpcTarget: ""
agentGrpcAuthority: ""
serviceGrpcInsecure: false
reconcile:
enabled: true
interval: 100
Expand Down Expand Up @@ -248,9 +244,12 @@ harness:

## Harness GitOps Agent
agent:
# -- GitOps Agent name
# -- GitOps Agent entity name
name: gitops-agent

# -- GitOps Agent identifier name
harnessName: gitops-agent

# -- The number of agent pods to run
replicas: 1

Expand Down Expand Up @@ -397,13 +396,6 @@ agent:
# -- Labels to be added to agentƒ pods
podLabels: {}

# -- Deployment strategy to be added to the agent Deployment
deploymentStrategy: {}
# type: RollingUpdate
# rollingUpdate:
# maxSurge: 25%
# maxUnavailable: 25%

# -- Secrets with credentials to pull images from a private registry
# @default -- `[]` (defaults to global.imagePullSecrets)
imagePullSecrets: []
Expand Down

0 comments on commit 8fa77a1

Please sign in to comment.