Skip to content

Commit

Permalink
Change volume variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
rthallisey committed May 4, 2020
1 parent d8ee137 commit c5f5116
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/cincinnati/cincinnati_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ func TestEnsureDeployment(t *testing.T) {
assert.Equal(t, found.Spec.Template.Spec.Containers[1].Name, resources.policyEngineContainer.Name)
assert.Equal(t, found.Spec.Template.Spec.Containers[1].Image, resources.graphBuilderContainer.Image)
if test.caCert {
assert.Equal(t, found.Spec.Template.Spec.Volumes[2].Name, NameConfigMapTrustedCA)
assert.Equal(t, found.Spec.Template.Spec.Containers[0].VolumeMounts[2].Name, NameConfigMapTrustedCA)
assert.Equal(t, found.Spec.Template.Spec.Volumes[2].Name, NameTrustedCAVolume)
assert.Equal(t, found.Spec.Template.Spec.Containers[0].VolumeMounts[2].Name, NameTrustedCAVolume)
}

initContainer := found.Spec.Template.Spec.InitContainers[0]
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/cincinnati/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const (
NameInitContainerGraphData string = "graph-data"
// openshiftConfigNamespace is the name of openshift's configuration namespace
openshiftConfigNamespace = "openshift-config"
// NameConfigMapTrustedCA is the name of the copied ConfigMap from openshift-config
NameConfigMapTrustedCA = "trusted-ca"
// NameTrustedCAVolume is the name of the Volume used in Cincinnati's deployment containing the CA Cert
NameTrustedCAVolume = "trusted-ca"
// NameCertConfigMapKey is the ConfigMap key name where the operator expects the external registry CA Cert
NameCertConfigMapKey = "cincinnati-registry"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/cincinnati/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func (k *kubeResources) newDeployment(instance *cv1alpha1.Cincinnati, externalCA

if externalCACert {
v := corev1.Volume{
Name: NameConfigMapTrustedCA,
Name: NameTrustedCAVolume,
VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{
DefaultMode: &mode,
Expand Down Expand Up @@ -419,7 +419,7 @@ func (k *kubeResources) newGraphBuilderContainer(instance *cv1alpha1.Cincinnati,
}
if externalCACert {
v := corev1.VolumeMount{
Name: NameConfigMapTrustedCA,
Name: NameTrustedCAVolume,
ReadOnly: true,
MountPath: "/etc/pki/ca-trust/extracted/pem",
}
Expand Down

0 comments on commit c5f5116

Please sign in to comment.