Documentation
¶
Index ¶
Constants ¶
View Source
const ApiVersion = "v1"
View Source
const ContentTypeJSON = "application/json"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubernetesSnapshot ¶
type KubernetesSnapshot struct { // k8s resources IngressClasses []*kates.IngressClass `json:"ingressclasses"` Ingresses []*kates.Ingress `json:"ingresses"` Services []*kates.Service `json:"service"` K8sEndpoints []*kates.Endpoints `json:"-"` // Endpoints from Kubernetes Endpoints []*kates.Endpoints `json:"Endpoints"` // Endpoints we'll actually feed to Ambassador // ambassador resources Hosts []*amb.Host `json:"Host"` Mappings []*amb.Mapping `json:"Mapping"` TCPMappings []*amb.TCPMapping `json:"TCPMapping"` Modules []*amb.Module `json:"Module"` TLSContexts []*amb.TLSContext `json:"TLSContext"` // plugin services AuthServices []*amb.AuthService `json:"AuthService"` RateLimitServices []*amb.RateLimitService `json:"RateLimitService"` LogServices []*amb.LogService `json:"LogService"` TracingServices []*amb.TracingService `json:"TracingService"` DevPortals []*amb.DevPortal `json:"DevPortal"` // resolvers ConsulResolvers []*amb.ConsulResolver `json:"ConsulResolver"` KubernetesEndpointResolvers []*amb.KubernetesEndpointResolver `json:"KubernetesEndpointResolver"` KubernetesServiceResolvers []*amb.KubernetesServiceResolver `json:"KubernetesServiceResolver"` KNativeClusterIngresses []*kates.Unstructured `json:"clusteringresses.networking.internal.knative.dev,omitempty"` KNativeIngresses []*kates.Unstructured `json:"ingresses.networking.internal.knative.dev,omitempty"` K8sSecrets []*kates.Secret `json:"-"` // Secrets from Kubernetes FSSecrets map[SecretRef]*kates.Secret `json:"-"` // Secrets from the filesystem Secrets []*kates.Secret `json:"secret"` // Secrets we'll feed to Ambassador Annotations []kates.Object `json:"-"` }
func (*KubernetesSnapshot) Render ¶
func (a *KubernetesSnapshot) Render() string
func (*KubernetesSnapshot) Sanitize ¶
func (ambInputs *KubernetesSnapshot) Sanitize() error
type Snapshot ¶
type Snapshot struct { // The Kubernetes field contains all the ambassador inputs from kubernetes. Kubernetes *KubernetesSnapshot // The Consul field contains endpoint data for any mappings setup to use a // consul resolver. Consul *watt.ConsulSnapshot // The Deltas field contains a list of deltas to indicate what has changed // since the prior snapshot. This is only computed for the Kubernetes // portion of the snapshot. Changes in the Consul endpoint data are not // reflected in this field. Deltas []*kates.Delta // The Invalid field contains any kubernetes resources that have failed // validation. Invalid []*kates.Unstructured Raw json.RawMessage `json:"-"` }
The snapshot type represents a complete configuration snapshot as sent to diagd.
func (*Snapshot) Sanitize ¶
Currently, this only removes "sensitive" information, which, for now, is just Secrets.data and anything that's not object metadata from Invalid objects. (since we couldn't parse the things in "invalid", we actually don't know what they are so they could contain secrets.)
TODO:(@acookin) Could also remove server generated bits from here, e.g. the last applied configuration annotation that the kube server applies. The benefit of that would be to reduce bits sent across the wire.
Click to show internal directories.
Click to hide internal directories.