Documentation ¶
Index ¶
- func NewArgoCDApplicationValidator(c client.Client, dec *admission.Decoder, ...) http.Handler
- func NewContourHTTPProxyMutator(c client.Client, dec *admission.Decoder, defaultClass string, ...) http.Handler
- func NewContourHTTPProxyValidator(c client.Client, dec *admission.Decoder) http.Handler
- func NewDeleteValidator(c client.Client, dec *admission.Decoder) http.Handler
- func NewDeploymentReplicaCountScaleValidator(c client.Client, decoder *admission.Decoder) http.Handler
- func NewDeploymentReplicaCountValidator(c client.Client, decoder *admission.Decoder) http.Handler
- func NewGrafanaDashboardValidator(c client.Client, dec *admission.Decoder) http.Handler
- func NewPodMutator(c client.Client, dec *admission.Decoder, ephemeralStoragePermissive bool) http.Handler
- func NewPodValidator(c client.Client, dec *admission.Decoder, validImagePrefixes []string, ...) http.Handler
- func NewPreventDeleteValidator(c client.Client, dec *admission.Decoder) http.Handler
- type ArgoCDApplicationRule
- type ArgoCDApplicationValidatorConfig
- type Config
- type HTTPProxyIPFilterPolicy
- type HTTPProxyMutatorConfig
- type HTTPProxyPolicy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewArgoCDApplicationValidator ¶
func NewArgoCDApplicationValidator(c client.Client, dec *admission.Decoder, config *ArgoCDApplicationValidatorConfig, repositoryPermissive bool) http.Handler
NewArgoCDApplicationValidator creates a webhook handler for ArgoCD Application.
func NewContourHTTPProxyMutator ¶
func NewContourHTTPProxyMutator(c client.Client, dec *admission.Decoder, defaultClass string, config *HTTPProxyMutatorConfig) http.Handler
NewContourHTTPProxyMutator creates a webhook handler for Contour HTTPProxy.
func NewContourHTTPProxyValidator ¶
NewContourHTTPProxyValidator creates a webhook handler for Contour HTTPProxy.
func NewDeleteValidator ¶
NewDeleteValidator creates a webhook handler to validate DELETE requests.
func NewDeploymentReplicaCountValidator ¶
NewDeploymentReplicaCountValidator returns a webhook handler to validate CREATE and UPDATE for Deployment resource.
This webhook denies a resources if the resource has the annotation `admission.cybozu.com/force-replica-count: "0"` and its .spec.replicas is not zero.
func NewGrafanaDashboardValidator ¶
NewGrafanaDashboardValidator creates a webhook handler for GrafanaDashboard.
func NewPodMutator ¶
func NewPodMutator(c client.Client, dec *admission.Decoder, ephemeralStoragePermissive bool) http.Handler
NewPodMutator creates a webhook handler for Pod.
Types ¶
type ArgoCDApplicationRule ¶
type ArgoCDApplicationRule struct { Repository string `json:"repository"` RepositoryPrefix string `json:"repositoryPrefix"` Projects []string `json:"projects"` }
ArgoCDApplicationRule is a rule for applications
type ArgoCDApplicationValidatorConfig ¶
type ArgoCDApplicationValidatorConfig struct {
Rules []ArgoCDApplicationRule `json:"rules"`
}
ArgoCDApplicationValidatorConfig is a config for application validator
type Config ¶
type Config struct { ArgoCDApplicationValidatorConfig ArgoCDApplicationValidatorConfig `json:"ArgoCDApplicationValidator"` HTTPProxyMutatorConfig HTTPProxyMutatorConfig `json:"HTTPProxyMutatorConfig"` }
Config is a config for neco-admission
type HTTPProxyIPFilterPolicy ¶
type HTTPProxyMutatorConfig ¶
type HTTPProxyMutatorConfig struct {
Policies []HTTPProxyPolicy `json:"policies"`
}
type HTTPProxyPolicy ¶
type HTTPProxyPolicy struct { Name string `json:"name"` IpAllowPolicy []HTTPProxyIPFilterPolicy `json:"ipAllowPolicy"` }