Skip to content

Commit

Permalink
renamed field ScmRootCaPath to SCMRootCaPath
Browse files Browse the repository at this point in the history
Signed-off-by: ishitasequeira <[email protected]>
  • Loading branch information
ishitasequeira committed Aug 31, 2023
1 parent 2f19674 commit 7cab369
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion api/v1beta1/argocd_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ type ArgoCDApplicationSet struct {

WebhookServer WebhookServerSpec `json:"webhookServer,omitempty"`

ScmRootCaPath string `json:"scmRootCaPath,omitempty"`
SCMRootCaPath string `json:"scmRootCaPath,omitempty"`
}

// ArgoCDCASpec defines the CA options for ArgCD.
Expand Down
8 changes: 4 additions & 4 deletions controllers/argocd/applicationset.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ func getArgoApplicationSetCommand(cr *argoproj.ArgoCD) []string {
cmd = append(cmd, "--loglevel")
cmd = append(cmd, getLogLevel(cr.Spec.ApplicationSet.LogLevel))

if cr.Spec.ApplicationSet.ScmRootCaPath != "" {
if cr.Spec.ApplicationSet.SCMRootCaPath != "" {
cmd = append(cmd, "--scm-root-ca-path")
cmd = append(cmd, cr.Spec.ApplicationSet.ScmRootCaPath)
cmd = append(cmd, cr.Spec.ApplicationSet.SCMRootCaPath)
}

// ApplicationSet command arguments provided by the user
Expand Down Expand Up @@ -150,7 +150,7 @@ func (r *ReconcileArgoCD) reconcileApplicationSetDeployment(cr *argoproj.ArgoCD,
},
}
addSCMGitlabVolumeMount := false
if cr.Spec.ApplicationSet.ScmRootCaPath != "" {
if cr.Spec.ApplicationSet.SCMRootCaPath != "" {
cm := newConfigMapWithName(getCAConfigMapName(cr), cr)
if argoutil.IsObjectFound(r.Client, cr.Namespace, common.ArgoCDAppSetGitlabSCMTLSCertsConfigMapName, cm) {
addSCMGitlabVolumeMount = true
Expand Down Expand Up @@ -277,7 +277,7 @@ func applicationSetContainer(cr *argoproj.ArgoCD, addSCMGitlabVolumeMount bool)
if addSCMGitlabVolumeMount {
container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{
Name: "appset-gitlab-scm-tls-cert",
MountPath: cr.Spec.ApplicationSet.ScmRootCaPath,
MountPath: cr.Spec.ApplicationSet.SCMRootCaPath,
})
}
return container
Expand Down
4 changes: 2 additions & 2 deletions controllers/argocd/applicationset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func checkExpectedDeploymentValues(t *testing.T, r *ReconcileArgoCD, deployment
},
}

if a.Spec.ApplicationSet.ScmRootCaPath != "" && argoutil.IsObjectFound(r.Client, a.Namespace, common.ArgoCDAppSetGitlabSCMTLSCertsConfigMapName, a) {
if a.Spec.ApplicationSet.SCMRootCaPath != "" && argoutil.IsObjectFound(r.Client, a.Namespace, common.ArgoCDAppSetGitlabSCMTLSCertsConfigMapName, a) {
volumes = append(volumes, corev1.Volume{
Name: "appset-gitlab-scm-tls-cert",
VolumeSource: corev1.VolumeSource{
Expand Down Expand Up @@ -363,7 +363,7 @@ func TestReconcileApplicationSet_Deployments_SpecOverride(t *testing.T) {
{
name: "ensure scm tls cert mount is present",
appSetField: &argoproj.ArgoCDApplicationSet{
ScmRootCaPath: "testPath",
SCMRootCaPath: "testPath",
},
envVars: map[string]string{common.ArgoCDImageEnvName: "custom-env-image"},
expectedContainerImage: "custom-env-image",
Expand Down

0 comments on commit 7cab369

Please sign in to comment.