Skip to content

Commit

Permalink
Fix config patch comparison and glance.patch example
Browse files Browse the repository at this point in the history
  • Loading branch information
matbu authored and davidjpeacock committed Oct 30, 2023
1 parent 2fff424 commit ba2633f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 25 deletions.
32 changes: 10 additions & 22 deletions examples/glance/glance.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ spec:
enabled: true
template:
databaseInstance: openstack
containerImage: quay.io/podified-antelope-centos9/openstack-glance-api:current-podified
customServiceConfig: |
[DEFAULT]
enabled_backends=default_backend:rbd
Expand All @@ -17,28 +16,17 @@ spec:
storageClass: "local-storage"
storageRequest: 10G
glanceAPIInternal:
externalEndpoints:
- endpoint: internal
ipAddressPool: internalapi
loadBalancerIPs:
- 172.17.0.80
override:
service:
metadata:
annotations:
metallb.universe.tf/address-pool: internalapi
metallb.universe.tf/allow-shared-ip: internalapi
metallb.universe.tf/loadBalancerIPs: 172.17.0.80
spec:
type: LoadBalancer
networkAttachments:
- storage
glanceAPIExternal:
networkAttachments:
- storage
extraMounts:
- extraVol:
- propagation:
- Glance
extraVolType: Ceph
volumes:
- name: ceph
projected:
sources:
- secret:
name: ceph-conf-files
mounts:
- name: ceph
mountPath: "/etc/ceph"
readOnly: true
- storage
6 changes: 3 additions & 3 deletions pkg/servicecfg/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func DiffServiceConfig(service string, ocpConfig string, serviceConfig string, s
panic(err)
}

_, err = CompareIniConfig([]byte(servicePatch), osConfig, ocpConfig, serviceConfig)
_, err = CompareIniConfig(osConfig, []byte(servicePatch), serviceConfig, ocpConfig)
if err != nil {
panic(err)
}
Expand Down Expand Up @@ -109,7 +109,7 @@ func DiffServiceConfigFromPod(service string, ocpConfig string, serviceConfig st
panic(err)
}

_, err = CompareIniConfig([]byte(servicePatch), podConfig, ocpConfig, serviceConfig)
_, err = CompareIniConfig(podConfig, []byte(servicePatch), serviceConfig, ocpConfig)
if err != nil {
panic(err)
}
Expand All @@ -135,7 +135,7 @@ func DiffServiceConfigFromPodman(service string, ocpConfig string, serviceConfig
panic(err)
}

_, err = CompareIniConfig([]byte(servicePatch), osConfig, ocpConfig, serviceConfig)
_, err = CompareIniConfig(osConfig, []byte(servicePatch), serviceConfig, ocpConfig)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit ba2633f

Please sign in to comment.