Skip to content

Commit

Permalink
Add constants for webhook api groups (#15)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha committed Jul 15, 2021
1 parent 7922832 commit c2d058b
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 10 deletions.
10 changes: 8 additions & 2 deletions apis/catalog/register.go
Expand Up @@ -16,5 +16,11 @@ limitations under the License.

package catalog

// GroupName is the group name use in this package
const GroupName = "catalog.kubevault.com"
const (
// GroupName is the group name use in this package
GroupName = "catalog.kubevault.com"
// MutatorGroupName is the group name used to implement mutating webhooks for types in this package
MutatorGroupName = "mutators." + GroupName
// ValidatorGroupName is the group name used to implement validating webhooks for types in this package
ValidatorGroupName = "validators." + GroupName
)
10 changes: 8 additions & 2 deletions apis/config/register.go
Expand Up @@ -16,5 +16,11 @@ limitations under the License.

package config

// GroupName is the group name use in this package
const GroupName = "config.kubevault.com"
const (
// GroupName is the group name use in this package
GroupName = "config.kubevault.com"
// MutatorGroupName is the group name used to implement mutating webhooks for types in this package
MutatorGroupName = "mutators." + GroupName
// ValidatorGroupName is the group name used to implement validating webhooks for types in this package
ValidatorGroupName = "validators." + GroupName
)
10 changes: 8 additions & 2 deletions apis/engine/register.go
Expand Up @@ -16,5 +16,11 @@ limitations under the License.

package engine

// GroupName is the group name use in this package
const GroupName = "engine.kubevault.com"
const (
// GroupName is the group name use in this package
GroupName = "engine.kubevault.com"
// MutatorGroupName is the group name used to implement mutating webhooks for types in this package
MutatorGroupName = "mutators." + GroupName
// ValidatorGroupName is the group name used to implement validating webhooks for types in this package
ValidatorGroupName = "validators." + GroupName
)
10 changes: 8 additions & 2 deletions apis/kubevault/register.go
Expand Up @@ -16,5 +16,11 @@ limitations under the License.

package kubevault

// GroupName is the group name use in this package
const GroupName = "kubevault.com"
const (
// GroupName is the group name use in this package
GroupName = "kubevault.com"
// MutatorGroupName is the group name used to implement mutating webhooks for types in this package
MutatorGroupName = "mutators." + GroupName
// ValidatorGroupName is the group name used to implement validating webhooks for types in this package
ValidatorGroupName = "validators." + GroupName
)
10 changes: 8 additions & 2 deletions apis/policy/register.go
Expand Up @@ -16,5 +16,11 @@ limitations under the License.

package policy

// GroupName is the group name use in this package
const GroupName = "policy.kubevault.com"
const (
// GroupName is the group name use in this package
GroupName = "policy.kubevault.com"
// MutatorGroupName is the group name used to implement mutating webhooks for types in this package
MutatorGroupName = "mutators." + GroupName
// ValidatorGroupName is the group name used to implement validating webhooks for types in this package
ValidatorGroupName = "validators." + GroupName
)

0 comments on commit c2d058b

Please sign in to comment.