Documentation ¶
Index ¶
- Constants
- func NewKongClient(client request.HTTPClient, apiURL string) (request.Interface, error)
- type Config
- type Handler
- func (h *Handler) Authorize(hd http.Handler) http.Handler
- func (h *Handler) DeploymentsOnCreate(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeploymentsOnMod(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DomainsOnCreate(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DomainsOnHead(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DomainsOnMod(w http.ResponseWriter, r *http.Request)
- func (h *Handler) IngressOnCreate(w http.ResponseWriter, r *http.Request)
- func (h *Handler) IngressOnDelete(w http.ResponseWriter, r *http.Request)
- func (h *Handler) IngressOnPatch(w http.ResponseWriter, r *http.Request)
- func (h *Handler) NamespaceOnCreate(w http.ResponseWriter, r *http.Request)
- func (h *Handler) NamespaceOnList(w http.ResponseWriter, r *http.Request)
- func (h *Handler) NamespaceOnMod(w http.ResponseWriter, r *http.Request)
Constants ¶
View Source
const ( // NamespaceIsolationAnnotation deny traffic between pods // https://kubernetes.io/docs/concepts/services-networking/networkpolicies/#configuring-namespace-isolation NamespaceIsolationAnnotation = "net.beta.kubernetes.io/network-policy" )
View Source
const (
OSUserID = 2000
)
Variables ¶
This section is empty.
Functions ¶
func NewKongClient ¶
Types ¶
type Config ¶
type Config struct { Host string `envconfig:"KUBERNETES_SERVICE_HOST" required:"true"` TLSInsecure bool TLSServerConfig rest.TLSClientConfig TLSClientConfig rest.TLSClientConfig Serve string AllowedImages string RegistryImages string KongAPIHost string }
Config is the daemon base configuration
func (*Config) GetServeAddress ¶
GetServeAddress return the address to bind the server
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the base handler for all mutators
func NewHandler ¶
func NewHandler(clientset kubernetes.Interface, tprClient rest.Interface, kongClient request.Interface, cfg *Config) *Handler
NewHandler creates a new mutator Handler
func (*Handler) DeploymentsOnCreate ¶
func (h *Handler) DeploymentsOnCreate(w http.ResponseWriter, r *http.Request)
DeploymentsOnCreate mutate requests on POST
func (*Handler) DeploymentsOnMod ¶
func (h *Handler) DeploymentsOnMod(w http.ResponseWriter, r *http.Request)
DeploymentsOnMod mutates PUT and PATCH requests
func (*Handler) DomainsOnCreate ¶
func (h *Handler) DomainsOnCreate(w http.ResponseWriter, r *http.Request)
DomainsOnCreate validate and mutates POST requests
func (*Handler) DomainsOnHead ¶
func (h *Handler) DomainsOnHead(w http.ResponseWriter, r *http.Request)
DomainsOnHead performs a check and verify if a primary domain is already claimed in the cluster
func (*Handler) DomainsOnMod ¶
func (h *Handler) DomainsOnMod(w http.ResponseWriter, r *http.Request)
DomainsOnMod mutates and validates PUT and PATCH requests
func (*Handler) IngressOnCreate ¶
func (h *Handler) IngressOnCreate(w http.ResponseWriter, r *http.Request)
func (*Handler) IngressOnDelete ¶
func (h *Handler) IngressOnDelete(w http.ResponseWriter, r *http.Request)
func (*Handler) IngressOnPatch ¶
func (h *Handler) IngressOnPatch(w http.ResponseWriter, r *http.Request)
func (*Handler) NamespaceOnCreate ¶
func (h *Handler) NamespaceOnCreate(w http.ResponseWriter, r *http.Request)
NamespaceOnCreate mutates k8s request on creation
func (*Handler) NamespaceOnList ¶
func (h *Handler) NamespaceOnList(w http.ResponseWriter, r *http.Request)
func (*Handler) NamespaceOnMod ¶
func (h *Handler) NamespaceOnMod(w http.ResponseWriter, r *http.Request)
NamespaceOnMod mutates k8s request on modify http methods (PUT, PATCH)
Click to show internal directories.
Click to hide internal directories.