When generating a resource, of the same type, with the same name (presumably using resource markers with different conditions), the function names are generated the same. Take the below for example:
---
# +operator-builder:resource:collectionField=services.secrets,value="none",include
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-secrets-store-provider-aws
namespace: platform #+operator-builder:collection:field:name=namespaces.platform,default="platform",type=string
---
# +operator-builder:resource:collectionField=services.secrets,value="secretsManager",include
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-secrets-store-provider-aws
namespace: platform #+operator-builder:collection:field:name=namespaces.platform,default="platform",type=string
annotations:
# +operator-builder:collection:field:name=services.secrets,type=string,default="none",description=`
# +kubebuilder:validation:Enum:secretsManager;none
# The provider which supplies secret management capabilities. The following
# providers are supported: ["none", "secretsManager"].`
platform.providers/shared-storage: "secretsManager"
The code is laid down for both of these for both cases (none versus secretsManager). However, the function name to lay down these resources is the same.
We need a way to de-duplicate the CreateFuncNames and InitFuncNames so that we do not have the overlaps when this condition occurs.
When generating a resource, of the same type, with the same name (presumably using resource markers with different conditions), the function names are generated the same. Take the below for example:
The code is laid down for both of these for both cases (
none
versussecretsManager
). However, the function name to lay down these resources is the same.We need a way to de-duplicate the
CreateFuncNames
andInitFuncNames
so that we do not have the overlaps when this condition occurs.