Documentation ¶
Index ¶
- Constants
- Variables
- func AddToManager(m manager.Manager) error
- func Parse(key string, value interface{}) (map[string]interface{}, error)
- type AdmissionMutator
- type AdmissionObj
- type AdmissionValidator
- type AdmissionWhConfig
- type CloudCatalog
- type Dependent
- type EnglishC
- type ExclusivesConfig
- type ImmutablesConfig
- type LabelsConfig
- type MetadataC
- type OverviewC
- type ResourceC
- type RestResult
- type ServiceC
- type UpdateableService
Constants ¶
const ExclusivesConfigPath = "/etc/config/validation/exclusives"
ExclusivesConfigPath is path where the ConfigMap is mounted for the mutual exclusive specifiction fields
const IBMCloudCatalogURI = "https://globalcatalog.cloud.ibm.com/api/v1"
IBMCloudCatalogURI is the uri for IBM cloud service catalog. It is used by validator to verify if a service plan is updateable.
const ImmutablesConfigPath = "/etc/config/validation/immutables"
ImmutablesConfigPath is path where the ConfigMap is mounted for the immutable specifiction fields
const LabelsConfigPath = "/etc/config/validation/labels"
LabelsConfigPath is path where the ConfigMap is mounted for the required labels
const MutateWhConfigPath = "/etc/config/mutate-wh/config"
MutateWhConfigPath is path where the ConfigMap is mounted for the validating webhook config data
const ValidateWhConfigPath = "/etc/config/validate-wh/config"
ValidateWhConfigPath is path where the ConfigMap is mounted for the validating webhook config data
Variables ¶
var AddToManagerFuncs []func(manager.Manager) error
AddToManagerFuncs is a list of functions to add all Controllers to the Manager
Functions ¶
func AddToManager ¶
AddToManager adds all Controllers to the Manager +kubebuilder:rbac:groups=admissionregistration.k8s.io,resources=mutatingwebhookconfigurations;validatingwebhookconfigurations,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups="",resources="",verbs=get;list +kubebuilder:rbac:groups="ibmcloud.ibm.com",resources="*",verbs=get;list
Types ¶
type AdmissionMutator ¶
type AdmissionMutator struct {
// contains filtered or unexported fields
}
AdmissionMutator - Mutating webhook for seed resources
func (*AdmissionMutator) InjectClient ¶
func (m *AdmissionMutator) InjectClient(c client.Client) error
InjectClient injects the client into the AdmissionMutator
type AdmissionObj ¶
type AdmissionObj struct { TypeMeta metav1.TypeMeta `json:",inline"` ObjectMeta metav1.ObjectMeta `json:"metadata"` }
AdmissionObj a general struct for kube request object
type AdmissionValidator ¶
type AdmissionValidator struct {
// contains filtered or unexported fields
}
AdmissionValidator - Validating webhook for seed resources
func (*AdmissionValidator) InjectClient ¶
func (v *AdmissionValidator) InjectClient(c client.Client) error
InjectClient injects the client into the AdmissionValidator
type AdmissionWhConfig ¶
type AdmissionWhConfig struct { Name string `json:"name"` Rules []admissionregistrationv1beta1.RuleWithOperations `json:",inline" protobuf:"bytes,2,opt,name=rule"` }
AdmissionWhConfig - a struct for admission webhook registration data
type CloudCatalog ¶
type CloudCatalog struct { Count float64 `json:"count"` Next string `json:"next"` Resources []ResourceC `json:"resources"` }
CloudCatalog represents the calalog listing as defined in ibmcloud catalog api
type EnglishC ¶
type EnglishC struct {
DisplayName string `json:"display_name"`
}
EnglishC represents the resource overview_ui.en as defined in ibmcloud catalog api
type ExclusivesConfig ¶
type ExclusivesConfig struct { Kind string `json:"kind"` Group string `json:"group"` Version string `json:"version,omitempty"` Exclusives [][]string `json:"exclusives,omitempty"` }
ExclusivesConfig - a struct for mutual exclusion rules
type ImmutablesConfig ¶
type ImmutablesConfig struct { Kind string `json:"kind"` Immutables []string `json:"immutables,omitempty"` }
ImmutablesConfig - a struct for immutable rules
type LabelsConfig ¶
LabelsConfig - a struct for required labels per resource type
type OverviewC ¶
type OverviewC struct {
Engish EnglishC `json:"en"`
}
OverviewC represents the resource overview_ui as defined in ibmcloud catalog api
type ResourceC ¶
type ResourceC struct { Metadata MetadataC `json:"metadata"` Overview OverviewC `json:"overview_ui"` Kind string `json:"kind"` ID string `json:"id"` Name string `json:"name"` }
ResourceC represents the resource as defined in ibmcloud catalog api
type RestResult ¶
RestResult is a struct for REST call result
type ServiceC ¶
type ServiceC struct {
PlanUpdateable bool `json:"plan_updateable"`
}
ServiceC represents the service as defined in ibmcloud catalog api
type UpdateableService ¶
type UpdateableService struct { Name string `json:"name"` DisplayName string `json:"display_name"` ID string `json:"id"` }
UpdateableService represents a cloud service that can be upgraded dynamically