v1

package
v0.0.0-...-a613b17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the v1 API group +kubebuilder:object:generate=true +groupName=vc.io

  • (c) Copyright IBM Corp. 2021
  • (c) Copyright VC Inc. 2021

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "vc.io", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type AgentMode

type AgentMode string
const (
	APM            AgentMode = "APM"
	INFRASTRUCTURE AgentMode = "INFRASTRUCTURE"
	AWS            AgentMode = "AWS"
	KUBERNETES     AgentMode = "KUBERNETES"
)

type AgentPodSpec

type AgentPodSpec struct {
	// agent.pod.annotations are additional annotations to be added to the agent pods.
	Annotations map[string]string `json:"annotations,omitempty"`

	// agent.pod.labels are additional labels to be added to the agent pods.
	Labels map[string]string `json:"labels,omitempty"`

	// agent.pod.tolerations are tolerations to influence agent pod assignment.
	Tolerations []coreV1.Toleration `json:"tolerations,omitempty"`

	// agent.pod.affinity are affinities to influence agent pod assignment.
	// https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
	Affinity coreV1.Affinity `json:"affinity,omitempty"`

	// agent.pod.priorityClassName is the name of an existing PriorityClass that should be set on the agent pods
	// https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
	PriorityClassName string `json:"priorityClassName,omitempty"`

	coreV1.ResourceRequirements `json:",inline"`
}

func (*AgentPodSpec) DeepCopy

func (in *AgentPodSpec) DeepCopy() *AgentPodSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentPodSpec.

func (*AgentPodSpec) DeepCopyInto

func (in *AgentPodSpec) DeepCopyInto(out *AgentPodSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BackendSpec

type BackendSpec struct {
	EndpointHost string `json:"endpointHost,omitempty"`
	EndpointPort string `json:"endpointPort,omitempty"`
	Key          string `json:"key,omitempty"`
}

func (*BackendSpec) DeepCopy

func (in *BackendSpec) DeepCopy() *BackendSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendSpec.

func (*BackendSpec) DeepCopyInto

func (in *BackendSpec) DeepCopyInto(out *BackendSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BaseAgentSpec

type BaseAgentSpec struct {
	//agent.mode is used to set agent mode and it can be APM, INFRASTRUCTURE or AWS
	Mode AgentMode `json:"mode,omitempty"`

	// agent.key is the secret token which your agent uses to authenticate to VC's servers.
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Agent Key",xDescriptors={"urn:alm:descriptor:io.kubernetes:Secret"}
	// +kubebuilder:validation:Required
	Key string `json:"key,omitempty"`

	// agent.downloadKey is key, sometimes known as "sales key", that allows you to download,
	// software from VC.
	DownloadKey string `json:"downloadKey,omitempty"`

	// Rather than specifying the agent key and optionally the download key, you can "bring your
	// own secret" creating it in the namespace in which you install the `vcagent` and
	// specify its name in the `keysSecret` field. The secret you create must contains
	// a field called `key` and optionally one called `downloadKey`, which contain, respectively,
	// the values you'd otherwise set in `.agent.key` and `agent.downloadKey`.
	KeysSecret string `json:"keysSecret,omitempty"`

	// agent.listenAddress is the IP address the agent HTTP server will listen to.
	ListenAddress string `json:"listenAddress,omitempty"`

	// agent.endpointHost is the hostname of the VC server your agents will connect to.
	// +kubebuilder:validation:Required
	EndpointHost string `json:"endpointHost,omitempty"`

	// agent.endpointPort is the port number (as a String) of the VC server your agents will connect to.
	// +kubebuilder:validation:Required
	EndpointPort string `json:"endpointPort,omitempty"`

	// These are additional backends the VC agent will report to besides
	// the one configured via the `agent.endpointHost`, `agent.endpointPort` and `agent.key` setting
	AdditionalBackends []BackendSpec `json:"additionalBackends,omitempty"`

	// TLS for end-to-end encryption between VC agent and clients accessing the agent.
	// The VC agent does not yet allow enforcing TLS encryption.
	// TLS is only enabled on a connection when requested by the client.
	TlsSpec `json:"tls,omitempty"`

	ImageSpec `json:"image,omitempty"`

	UpdateStrategy appV1.DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"`

	Pod AgentPodSpec `json:"pod,omitempty"`

	// agent.proxyHost sets the VC_AGENT_PROXY_HOST environment variable.
	ProxyHost string `json:"proxyHost,omitempty"`
	// agent.proxyPort sets the VC_AGENT_PROXY_PORT environment variable.
	ProxyPort string `json:"proxyPort,omitempty"`
	// agent.proxyProtocol sets the VC_AGENT_PROXY_PROTOCOL environment variable.
	ProxyProtocol string `json:"proxyProtocol,omitempty"`
	// agent.proxyUser sets the VC_AGENT_PROXY_USER environment variable.
	ProxyUser string `json:"proxyUser,omitempty"`
	// agent.proxyPassword sets the VC_AGENT_PROXY_PASSWORD environment variable.
	ProxyPassword string `json:"proxyPassword,omitempty"`
	// agent.proxyUseDNS sets the VC_AGENT_PROXY_USE_DNS environment variable.
	ProxyUseDNS bool `json:"proxyUseDNS,omitempty"`

	// use this to set additional environment variables for the vc agent
	// for example:
	//  env:
	//   VC_AGENT_TAGS: dev
	Env map[string]string `json:"env,omitempty"`

	Configuration     ConfigurationSpec `json:"configuration,omitempty"`
	ConfigurationYaml string            `json:"configuration_yaml,omitempty"`

	// agent.redactKubernetesSecrets sets the VC_KUBERNETES_REDACT_SECRETS environment variable.
	RedactKubernetesSecrets string `json:"redactKubernetesSecrets,omitempty"`

	// agent.host.repository sets a host path to be mounted as the agent maven repository (for debugging or development purposes)
	Host HostSpec `json:"host,omitempty"`

	// Override for the Maven repository URL when the Agent needs to connect to a locally provided Maven repository 'proxy'
	// Alternative to 'host.repository' for referencing a different Maven repo.
	MvnRepoUrl string `json:"vcMvnRepoUrl,omitempty"`
}

BaseAgentSpec defines the desired state info related to the running Agent +k8s:openapi-gen=true

func (*BaseAgentSpec) DeepCopy

func (in *BaseAgentSpec) DeepCopy() *BaseAgentSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaseAgentSpec.

func (*BaseAgentSpec) DeepCopyInto

func (in *BaseAgentSpec) DeepCopyInto(out *BaseAgentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigurationSpec

type ConfigurationSpec struct {
	// When setting this to true, the Helm chart will automatically look up the entries
	// of the default vcagent ConfigMap, and mount as agent configuration files
	// under /opt/vc/agent/etc/vc all entries with keys that match the
	// 'configuration-*.yaml' scheme
	AutoMountConfigEntries bool `json:"autoMountConfigEntries,omitempty"`
}

func (*ConfigurationSpec) DeepCopy

func (in *ConfigurationSpec) DeepCopy() *ConfigurationSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationSpec.

func (*ConfigurationSpec) DeepCopyInto

func (in *ConfigurationSpec) DeepCopyInto(out *ConfigurationSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Create

type Create struct {
	Create bool `json:"create,omitempty"`
}

func (*Create) DeepCopy

func (in *Create) DeepCopy() *Create

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Create.

func (*Create) DeepCopyInto

func (in *Create) DeepCopyInto(out *Create)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Enabled

type Enabled struct {
	Enabled bool `json:"enabled,omitempty"`
}

func (*Enabled) DeepCopy

func (in *Enabled) DeepCopy() *Enabled

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Enabled.

func (*Enabled) DeepCopyInto

func (in *Enabled) DeepCopyInto(out *Enabled)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HostSpec

type HostSpec struct {
	Repository string `json:"repository,omitempty"`
}

func (*HostSpec) DeepCopy

func (in *HostSpec) DeepCopy() *HostSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostSpec.

func (*HostSpec) DeepCopyInto

func (in *HostSpec) DeepCopyInto(out *HostSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImageSpec

type ImageSpec struct {
	// agent.image.name is the name of the container image of the VC agent.
	Name string `json:"name,omitempty"`
	// agent.image.digest is the digest (a.k.a. Image ID) of the agent container image; if specified, it has priority over agent.image.tag, which will be ignored.
	Digest string `json:"digest,omitempty"`
	// agent.image.tag is the tag name of the agent container image; if agent.image.digest is specified, this property is ignored.
	Tag string `json:"tag,omitempty"`
	// agent.image.pullPolicy specifies when to pull the image container.
	PullPolicy string `json:"pullPolicy,omitempty"`
	// agent.image.pullSecrets allows you to override the default pull secret that is created when agent.image.name starts with "containers.vc.io"
	// Setting agent.image.pullSecrets prevents the creation of the default "containers-eg-io" secret.
	PullSecrets []PullSecretSpec `json:"pullSecrets,omitempty"`
}

func (*ImageSpec) DeepCopy

func (in *ImageSpec) DeepCopy() *ImageSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec.

func (*ImageSpec) DeepCopyInto

func (in *ImageSpec) DeepCopyInto(out *ImageSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KubernetesDeploymentSpec

type KubernetesDeploymentSpec struct {
	Enabled  `json:",inline"`
	Replicas int                         `json:"replicas,omitempty"`
	Pod      coreV1.ResourceRequirements `json:"pod,omitempty"`
}

func (*KubernetesDeploymentSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesDeploymentSpec.

func (*KubernetesDeploymentSpec) DeepCopyInto

func (in *KubernetesDeploymentSpec) DeepCopyInto(out *KubernetesDeploymentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KubernetesSpec

type KubernetesSpec struct {
	DeploymentSpec KubernetesDeploymentSpec `json:"deployment,omitempty"`
}

func (*KubernetesSpec) DeepCopy

func (in *KubernetesSpec) DeepCopy() *KubernetesSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesSpec.

func (*KubernetesSpec) DeepCopyInto

func (in *KubernetesSpec) DeepCopyInto(out *KubernetesSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Name

type Name struct {
	Name string `json:"name,omitempty"`
}

func (*Name) DeepCopy

func (in *Name) DeepCopy() *Name

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Name.

func (*Name) DeepCopyInto

func (in *Name) DeepCopyInto(out *Name)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodSecurityPolicySpec

type PodSecurityPolicySpec struct {
	// Specifies whether a PodSecurityPolicy should be authorized for the VC Agent pods.
	// Requires `rbac.create` to be `true` as well.
	Enabled `json:",inline"`
	// The name of an existing PodSecurityPolicy you would like to authorize for the VC Agent pods.
	// If not set and `enable` is true, a PodSecurityPolicy will be created with a name generated using the fullname template.
	Name `json:",inline"`
}

func (*PodSecurityPolicySpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicySpec.

func (*PodSecurityPolicySpec) DeepCopyInto

func (in *PodSecurityPolicySpec) DeepCopyInto(out *PodSecurityPolicySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Prometheus

type Prometheus struct {
	RemoteWrite Enabled `json:"remoteWrite,omitempty"`
}

func (*Prometheus) DeepCopy

func (in *Prometheus) DeepCopy() *Prometheus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Prometheus.

func (*Prometheus) DeepCopyInto

func (in *Prometheus) DeepCopyInto(out *Prometheus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PullSecretSpec

type PullSecretSpec struct {
	Name `json:",inline"`
}

func (*PullSecretSpec) DeepCopy

func (in *PullSecretSpec) DeepCopy() *PullSecretSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PullSecretSpec.

func (*PullSecretSpec) DeepCopyInto

func (in *PullSecretSpec) DeepCopyInto(out *PullSecretSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceInfo

type ResourceInfo struct {
	Name string `json:"name"`
	UID  string `json:"uid"`
}

ResourceInfo holds Name and UID to given object

func (*ResourceInfo) DeepCopy

func (in *ResourceInfo) DeepCopy() *ResourceInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInfo.

func (*ResourceInfo) DeepCopyInto

func (in *ResourceInfo) DeepCopyInto(out *ResourceInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TlsSpec

type TlsSpec struct {
	// secretName is the name of the secret that has the relevant files.
	SecretName string `json:"secretName,omitempty"`
	// certificate (together with key) is the alternative to an existing Secret. Must be base64 encoded.
	Certificate string `json:"certificate,omitempty"`
	// key (together with certificate) is the alternative to an existing Secret. Must be base64 encoded.
	Key string `json:"key,omitempty"`
}

func (*TlsSpec) DeepCopy

func (in *TlsSpec) DeepCopy() *TlsSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TlsSpec.

func (*TlsSpec) DeepCopyInto

func (in *TlsSpec) DeepCopyInto(out *TlsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VcAgent

type VcAgent struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   VcAgentSpec   `json:"spec,omitempty"`
	Status VcAgentStatus `json:"status,omitempty"`
}

VcAgent is the Schema for the agents API

func (*VcAgent) DeepCopy

func (in *VcAgent) DeepCopy() *VcAgent

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VcAgent.

func (*VcAgent) DeepCopyInto

func (in *VcAgent) DeepCopyInto(out *VcAgent)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VcAgent) DeepCopyObject

func (in *VcAgent) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VcAgent) Hub

func (*VcAgent) Hub()

Hub marks this type as a conversion hub.

func (*VcAgent) SetupWebhookWithManager

func (r *VcAgent) SetupWebhookWithManager(mgr ctrl.Manager) error

type VcAgentList

type VcAgentList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VcAgent `json:"items"`
}

VcAgentList contains a list of VcAgent

func (*VcAgentList) DeepCopy

func (in *VcAgentList) DeepCopy() *VcAgentList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VcAgentList.

func (*VcAgentList) DeepCopyInto

func (in *VcAgentList) DeepCopyInto(out *VcAgentList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VcAgentList) DeepCopyObject

func (in *VcAgentList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VcAgentSpec

type VcAgentSpec struct {
	Agent BaseAgentSpec `json:"agent,omitempty"`

	// cluster.name represents the name that will be assigned to this cluster in VC
	Cluster Name `json:"cluster,omitempty"`

	OpenShift bool `json:"openshift,omitempty"`

	// Specifies whether RBAC resources should be created
	Rbac Create `json:"rbac,omitempty"`
	// Specifies whether to create the vcagent service to expose within the cluster the Prometheus remote-write, OpenTelemetry GRCP endpoint and other APIs
	// Note: Requires Kubernetes 1.17+, as it uses topologyKeys
	Service Create `json:"service,omitempty"`
	// If true, it will also apply `service.create=true`
	OpenTelemetry Enabled `json:"opentelemetry,omitempty"`

	Prometheus `json:"prometheus,omitempty"`
	// Specifies whether a ServiceAccount should be created
	// The name of the ServiceAccount to use.
	// If not set and `create` is true, a name is generated using the fullname template
	// name: vcagent
	ServiceAccount Create `json:"serviceAccount,omitempty"`

	PodSecurityPolicySpec `json:"podSecurityPolicy,omitempty"`

	Zone Name `json:"zone,omitempty"`

	KubernetesSpec `json:"kubernetes,omitempty"`

	ConfigurationFiles          map[string]string `json:"config.files,omitempty"`
	AgentZoneName               string            `json:"agent.zone.name,omitempty"`
	AgentKey                    string            `json:"agent.key,omitempty"`
	AgentEndpointHost           string            `json:"agent.endpoint.host,omitempty"`
	AgentEndpointPort           uint16            `json:"agent.endpoint.port,omitempty"`
	AgentClusterRoleName        string            `json:"agent.clusterRoleName,omitempty"`
	AgentClusterRoleBindingName string            `json:"agent.clusterRoleBindingName,omitempty"`
	AgentServiceAccountName     string            `json:"agent.serviceAccountName,omitempty"`
	AgentSecretName             string            `json:"agent.secretName,omitempty"`
	AgentDaemonSetName          string            `json:"agent.daemonSetName,omitempty"`
	AgentConfigMapName          string            `json:"agent.configMapName,omitempty"`
	AgentRbacCreate             bool              `json:"agent.rbac.create,omitempty"`
	AgentImageName              string            `json:"agent.image,omitempty"`
	AgentImagePullPolicy        string            `json:"agent.imagePullPolicy,omitempty"`
	AgentCpuReq                 resource.Quantity `json:"agent.cpuReq,omitempty"`
	AgentCpuLim                 resource.Quantity `json:"agent.cpuLimit,omitempty"`
	AgentMemReq                 resource.Quantity `json:"agent.memReq,omitempty"`
	AgentMemLim                 resource.Quantity `json:"agent.memLimit,omitempty"`
	AgentDownloadKey            string            `json:"agent.downloadKey,omitempty"`
	AgentRepository             string            `json:"agent.host.repository,omitempty"`
	AgentTlsSecretName          string            `json:"agent.tls.secretName,omitempty"`
	AgentTlsCertificate         string            `json:"agent.tls.certificate,omitempty"`
	AgentTlsKey                 string            `json:"agent.tls.key,omitempty"`
	OpenTelemetryEnabled        bool              `json:"opentelemetry.enabled,omitempty"`
	ClusterName                 string            `json:"cluster.name,omitempty"`
	AgentEnv                    map[string]string `json:"agent.env,omitempty"`
}

VcAgentSpec defines the desired state of the VC Agent

func (*VcAgentSpec) DeepCopy

func (in *VcAgentSpec) DeepCopy() *VcAgentSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VcAgentSpec.

func (*VcAgentSpec) DeepCopyInto

func (in *VcAgentSpec) DeepCopyInto(out *VcAgentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VcAgentStatus

type VcAgentStatus struct {
	OldVersionsUpdated bool `json:"oldVersionsUpdated,omitempty"`

	ConfigMap       ResourceInfo            `json:"configmap,omitempty"`
	DaemonSet       ResourceInfo            `json:"daemonset,omitempty"`
	LeadingAgentPod map[string]ResourceInfo `json:"leadingAgentPod,omitempty"`

	ServiceAccount     ResourceInfo `json:"serviceaccount,omitempty"`
	ClusterRole        ResourceInfo `json:"clusterrole,omitempty"`
	ClusterRoleBinding ResourceInfo `json:"clusterrolebinding,omitempty"`
	Secret             ResourceInfo `json:"secret,omitempty"`
}

VcAgentStatus defines the observed state of VcAgent

func (*VcAgentStatus) DeepCopy

func (in *VcAgentStatus) DeepCopy() *VcAgentStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VcAgentStatus.

func (*VcAgentStatus) DeepCopyInto

func (in *VcAgentStatus) DeepCopyInto(out *VcAgentStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL