Skip to content

Commit

Permalink
chore(service-mesh): exports configmap names to const (opendatahub-io…
Browse files Browse the repository at this point in the history
…#1149)

While creating service mesh features certain configs are written to the
config maps. To allow extending of this shared configuration across the code
base the names has been extracted and exported as const in servicemesh
package.
  • Loading branch information
bartoszmajsak authored Aug 1, 2024
1 parent a890ffa commit 31185c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions pkg/feature/servicemesh/const.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package servicemesh

const (
ConfigMapAuthRef = "auth-refs"
ConfigMapMeshRef = "service-mesh-refs"
)
4 changes: 2 additions & 2 deletions pkg/feature/servicemesh/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func MeshRefs(ctx context.Context, f *feature.Feature) error {
f.Client,
&corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Name: "service-mesh-refs",
Name: ConfigMapMeshRef,
Namespace: namespace,
},
Data: data,
Expand Down Expand Up @@ -76,7 +76,7 @@ func AuthRefs(ctx context.Context, f *feature.Feature) error {
f.Client,
&corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Name: "auth-refs",
Name: ConfigMapAuthRef,
Namespace: targetNamespace,
},
Data: data,
Expand Down

0 comments on commit 31185c3

Please sign in to comment.