Skip to content

Commit

Permalink
Merge pull request #293 from kajinamit/rm-KOLLA_CONFIG_FILE
Browse files Browse the repository at this point in the history
Stop using KOLLA_CONFIG_FILE environment
  • Loading branch information
openshift-merge-robot authored Aug 21, 2023
2 parents 36ff067 + 85729c5 commit 8af3cc2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
3 changes: 0 additions & 3 deletions pkg/glance/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ const (
// GlanceInternalPort -
GlanceInternalPort int32 = 9292

// KollaConfig -
KollaConfig = "/var/lib/config-data/merged/glance-api-config.json"

// GlanceExtraVolTypeUndefined can be used to label an extraMount which
// is not associated with a specific backend
GlanceExtraVolTypeUndefined storage.ExtraVolType = "Undefined"
Expand Down
1 change: 0 additions & 1 deletion pkg/glance/dbsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func DbSyncJob(
}

envVars := map[string]env.Setter{}
envVars["KOLLA_CONFIG_FILE"] = env.SetValue(KollaConfig)
envVars["KOLLA_CONFIG_STRATEGY"] = env.SetValue("COPY_ALWAYS")
envVars["KOLLA_BOOTSTRAP"] = env.SetValue("true")

Expand Down
6 changes: 6 additions & 0 deletions pkg/glance/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ func GetVolumeMounts(secretNames []string, hasCinder bool, extraVol []glancev1.G
MountPath: "/var/lib/config-data/merged",
ReadOnly: false,
},
{
Name: "config-data-merged",
MountPath: "/var/lib/kolla/config_files/config.json",
SubPath: "glance-api-config.json",
ReadOnly: true,
},
{
Name: "lib-data",
MountPath: "/var/lib/glance",
Expand Down
1 change: 0 additions & 1 deletion pkg/glanceapi/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ func Deployment(
}

envVars := map[string]env.Setter{}
envVars["KOLLA_CONFIG_FILE"] = env.SetValue(glance.KollaConfig)
envVars["KOLLA_CONFIG_STRATEGY"] = env.SetValue("COPY_ALWAYS")
envVars["CONFIG_HASH"] = env.SetValue(configHash)

Expand Down
4 changes: 2 additions & 2 deletions tests/functional/glanceapi_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ var _ = Describe("Glanceapi controller", func() {
Expect(ss.Spec.Template.Spec.Containers).To(HaveLen(1))

container := ss.Spec.Template.Spec.Containers[0]
Expect(container.VolumeMounts).To(HaveLen(3))
Expect(container.VolumeMounts).To(HaveLen(4))
Expect(container.Image).To(Equal(glanceTest.ContainerImage))
Expect(container.LivenessProbe.HTTPGet.Port.IntVal).To(Equal(int32(9292)))
Expect(container.ReadinessProbe.HTTPGet.Port.IntVal).To(Equal(int32(9292)))
Expand All @@ -157,7 +157,7 @@ var _ = Describe("Glanceapi controller", func() {
Expect(ss.Spec.Template.Spec.Containers).To(HaveLen(1))

container := ss.Spec.Template.Spec.Containers[0]
Expect(container.VolumeMounts).To(HaveLen(3))
Expect(container.VolumeMounts).To(HaveLen(4))
Expect(container.Image).To(Equal(glanceTest.ContainerImage))
Expect(container.LivenessProbe.HTTPGet.Port.IntVal).To(Equal(int32(9292)))
Expect(container.ReadinessProbe.HTTPGet.Port.IntVal).To(Equal(int32(9292)))
Expand Down

0 comments on commit 8af3cc2

Please sign in to comment.