Skip to content

Instantly share code, notes, and snippets.

@charith-elastic
Created August 8, 2019 08:46
Show Gist options
  • Save charith-elastic/9c65466bc98a56d6c39dcef976ba10e7 to your computer and use it in GitHub Desktop.
Save charith-elastic/9c65466bc98a56d6c39dcef976ba10e7 to your computer and use it in GitHub Desktop.

Reference

apm.k8s.elastic.co/v1alpha1

Package v1alpha1 contains API Schema definitions for the apm v1alpha1 API group

Resource Types

ApmServer

ApmServer

ApmServer is the Schema for the apmservers API

Field Description

apiVersion
string

apm.k8s.elastic.co/v1alpha1

kind
string

ApmServer

Refer to the Kubernetes API documentation for the fields of the metadata field.

version string

Version represents the version of the APM Server

image string

Image represents the docker image that will be used.

nodeCount int32

NodeCount defines how many nodes the Apm Server deployment must have.

config Config

Config represents the APM configuration.

http HTTPConfig

HTTP contains settings for HTTP.

elasticsearchRef ObjectSelector

ElasticsearchRef references an Elasticsearch resource in the Kubernetes cluster. If the namespace is not specified, the current resource namespace will be used.

elasticsearch ElasticsearchOutput

(Optional) Elasticsearch configures how the APM server connects to Elasticsearch

podTemplate Kubernetes core/v1.PodTemplateSpec

(Optional) PodTemplate can be used to propagate configuration to APM Server pods. This allows specifying custom annotations, labels, environment variables, affinity, resources, etc. for the pods created from this NodeSpec.

secureSettings SecretRef

SecureSettings reference a secret containing secure settings, to be injected into the APM keystore on each node. Each individual key/value entry in the referenced secret is considered as an individual secure setting to be injected. The secret must exist in the same namespace as the APM resource.

featureFlags FeatureFlags

FeatureFlags are apm-specific flags that enable or disable specific experimental features

ApmServerHealth(string alias)

(Appears on: ApmServerStatus )

ApmServerHealth expresses the status of the Apm Server instances.

ApmServerSpec

(Appears on: ApmServer )

ApmServerSpec defines the desired state of ApmServer

Field Description

version
string

Version represents the version of the APM Server

image
string

Image represents the docker image that will be used.

nodeCount
int32

NodeCount defines how many nodes the Apm Server deployment must have.

config
Config

Config represents the APM configuration.

http
HTTPConfig

HTTP contains settings for HTTP.

elasticsearchRef
ObjectSelector

ElasticsearchRef references an Elasticsearch resource in the Kubernetes cluster. If the namespace is not specified, the current resource namespace will be used.

elasticsearch
ElasticsearchOutput

(Optional) Elasticsearch configures how the APM server connects to Elasticsearch

(Optional) PodTemplate can be used to propagate configuration to APM Server pods. This allows specifying custom annotations, labels, environment variables, affinity, resources, etc. for the pods created from this NodeSpec.

secureSettings
SecretRef

SecureSettings reference a secret containing secure settings, to be injected into the APM keystore on each node. Each individual key/value entry in the referenced secret is considered as an individual secure setting to be injected. The secret must exist in the same namespace as the APM resource.

featureFlags
FeatureFlags

FeatureFlags are apm-specific flags that enable or disable specific experimental features

ApmServerStatus

(Appears on: ApmServer )

ApmServerStatus defines the observed state of ApmServer

Field Description

ReconcilerStatus
ReconcilerStatus

service
string

ExternalService is the name of the service the agents should connect to.

secretTokenSecret
string

SecretTokenSecretName is the name of the Secret that contains the secret token

Association
AssociationStatus

Association is the status of any auto-linking to Elasticsearch clusters.

ElasticsearchOutput

(Appears on: ApmServerSpec )

Elasticsearch contains configuration for the Elasticsearch output

Field Description

hosts
[]string

Hosts are the URLs of the output Elasticsearch nodes.

Auth configures authentication for APM Server to use.

SSL configures TLS-related configuration for Elasticsearch

ElasticsearchOutputSSL

(Appears on: ElasticsearchOutput )

ElasticsearchOutputSSL contains TLS-related configuration for Elasticsearch

Field Description

certificateAuthorities
SecretRef

CertificateAuthorities is a secret that contains a tls.crt entry that contain certificates for server verifications.

common.k8s.elastic.co/v1alpha1

Package v1alpha1 contains API Schema definitions for the common v1alpha1 API group

Associated

Resource Types

Associated interface represents a Elastic stack application that is associated with an Elasticsearch cluster. An associated object needs some credentials to establish a connection to the Elasticsearch cluster and usually it offers a keystore which in ECK is represented with an underlying Secret. Kibana and the APM server are two examples of associated objects.

AssociationStatus(string alias)

(Appears on: ApmServerStatus, KibanaStatus )

AssociationStatus is the status of an association resource.

Config

(Appears on: ApmServerSpec, KibanaSpec, NodeSpec )

Config represents untyped YAML configuration inside a spec.

Field Description

Data
map[string]interface{}

This field exists to work around kubernetes-sigs/kubebuilder#528

ElasticsearchAuth

ElasticsearchAuth contains auth config for Kibana to use with an Elasticsearch cluster

Field Description

Inline is auth provided as plaintext inline credentials.

SecretKeyRef is a secret that contains the credentials to use.

ElasticsearchInlineAuth

(Appears on: ElasticsearchAuth )

ElasticsearchInlineAuth is a basic username/password combination.

Field Description

username
string

User is the username to use.

password
string

Password is the password to use.

FeatureFlag(string alias)

FeatureFlag is a unique identifier used for feature flags

FeatureFlagState

FeatureFlagState contains the configured state of a FeatureFlag

Field Description

enabled
bool

Enabled enables this feature flag.

FeatureFlags(map[github.com/elastic/cloud-on-k8s/operators/pkg/apis/common/v1alpha1.FeatureFlag]github.com/elastic/cloud-on-k8s/operators/pkg/apis/common/v1alpha1.FeatureFlagState alias)

FeatureFlags is a collection of feature flags and their associated state

HTTPConfig

HTTPConfig configures a HTTP-based service.

Field Description

service
ServiceTemplate

Service is a template for the Kubernetes Service

TLS describe additional options to consider when generating HTTP TLS certificates.

ObjectSelector

(Appears on: ApmServerSpec, KibanaSpec )

ObjectSelector allows to specify a reference to an object across namespace boundaries.

Field Description

name
string

namespace
string

PodDisruptionBudgetTemplate

(Appears on: ElasticsearchSpec )

PodDisruptionBudgetTemplate contains a template for creating a PodDisruptionBudget.

Field Description

(Optional) ObjectMeta is metadata for the service. The name and namespace provided here is managed by ECK and will be ignored. Refer to the Kubernetes API documentation for the fields of the metadata field.

(Optional) Spec of the desired behavior of the PodDisruptionBudget

minAvailable k8s.io/apimachinery/pkg/util/intstr.IntOrString

(Optional) An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%".

selector Kubernetes meta/v1.LabelSelector

(Optional) Label query over pods whose evictions are managed by the disruption budget.

maxUnavailable k8s.io/apimachinery/pkg/util/intstr.IntOrString

(Optional) An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable".

ReconcilerStatus

ReconcilerStatus represents status information about desired/available nodes.

Field Description

availableNodes
int

SecretRef

SecretRef reference a secret by name.

Field Description

secretName
string

SelfSignedCertificate

(Appears on: TLSOptions )

Field Description

subjectAltNames
[SubjectAlternativeName]

SubjectAlternativeNames is a list of SANs to include in the HTTP TLS certificates. For example: a wildcard DNS to expose the cluster.

disabled
bool

Disabled turns off the provisioning of self-signed HTTP TLS certificates.

ServiceTemplate

(Appears on: HTTPConfig )

ServiceTemplate describes the data a service should have when created from a template

Field Description

(Optional) ObjectMeta is metadata for the service. The name and namespace provided here is managed by ECK and will be ignored. Refer to the Kubernetes API documentation for the fields of the metadata field.

(Optional) Spec defines the behavior of the service.

ports [Kubernetes core/v1.ServicePort]

The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies

selector map[string]string

(Optional) Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/

clusterIP string

(Optional) clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are "None", empty string (""), or a valid IP address. "None" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies

type Kubernetes core/v1.ServiceType

(Optional) type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ExternalName" maps to the specified externalName. "ClusterIP" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types

externalIPs []string

(Optional) externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.

sessionAffinity Kubernetes core/v1.ServiceAffinity

(Optional) Supports "ClientIP" and "None". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies

loadBalancerIP string

(Optional) Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.

loadBalancerSourceRanges []string

(Optional) If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/

externalName string

(Optional) externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName.

externalTrafficPolicy Kubernetes core/v1.ServiceExternalTrafficPolicyType

(Optional) externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. "Local" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. "Cluster" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.

healthCheckNodePort int32

(Optional) healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.

publishNotReadyAddresses bool

(Optional) publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet’s Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery.

sessionAffinityConfig Kubernetes core/v1.SessionAffinityConfig

(Optional) sessionAffinityConfig contains the configurations of session affinity.

SubjectAlternativeName

(Appears on: SelfSignedCertificate )

Field Description

dns
string

ip
string

TLSOptions

(Appears on: HTTPConfig )

Field Description

selfSignedCertificate
SelfSignedCertificate

SelfSignedCertificate define options to apply to self-signed certificate managed by the operator.

certificate
SecretRef

Certificate is a reference to a secret that contains the certificate and private key to be used.<br/><br/>The secret should have the following content:<br/><br/>- tls.crt: The certificate (or a chain). - tls.key: The private key to the first certificate in the certificate chain.

elasticsearch.k8s.elastic.co/v1alpha1

Package v1alpha1 contains API Schema definitions for the elasticsearch v1alpha1 API group

Resource Types

Elasticsearch

Elasticsearch

Elasticsearch is the Schema for the elasticsearches API

Field Description

apiVersion
string

elasticsearch.k8s.elastic.co/v1alpha1

kind
string

Elasticsearch

Refer to the Kubernetes API documentation for the fields of the metadata field.

version string

Version represents the version of the stack

image string

Image represents the docker image that will be used.

setVmMaxMapCount bool

SetVMMaxMapCount indicates whether an init container should be used to ensure that the vm.max_map_count is set according to https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html. Setting this to true requires the kubelet to allow running privileged containers. Defaults to true if not specified. To be disabled, it must be explicitly set to false.

http HTTPConfig

HTTP contains settings for HTTP.

nodes [NodeSpec]

Nodes represents a list of groups of nodes with the same configuration to be part of the cluster

featureFlags FeatureFlags

FeatureFlags are instance-specific flags that enable or disable specific experimental features

updateStrategy UpdateStrategy

UpdateStrategy specifies how updates to the cluster should be performed.

podDisruptionBudget PodDisruptionBudgetTemplate

(Optional) PodDisruptionBudget allows full control of the default pod disruption budget.<br/><br/>The default budget selects all cluster pods and sets maxUnavailable to 1. To disable it entirely, set to the empty value ({} in YAML).

secureSettings SecretRef

SecureSettings reference a secret containing secure settings, to be injected into Elasticsearch keystore on each node. Each individual key/value entry in the referenced secret is considered as an individual secure setting to be injected. The secret must exist in the same namespace as the Elasticsearch resource.

ChangeBudget

(Appears on: UpdateStrategy )

ChangeBudget defines how Pods in a single group should be updated.

Field Description

maxUnavailable
int

MaxUnavailable is the maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total pods at the start of update (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0 if you want automatic rolling changes to be applied. By default, a fixed value of 0 is used. Example: when this is set to 30%, the group can be scaled down by 30% immediately when the rolling update starts. Once new pods are ready, the group can be scaled down further, followed by scaling up the group, ensuring that at least 70% of the target number of pods are available at all times during the update.

maxSurge
int

MaxSurge is the maximum number of pods that can be scheduled above the original number of pods. By default, a fixed value of 1 is used. Value can be an absolute number (ex: 5) or a percentage of total pods at the start of the update (ex: 10%). This can not be 0 if MaxUnavailable is 0 if you want automatic rolling updates to be applied. Absolute number is calculated from percentage by rounding up. Example: when this is set to 30%, the new group can be scaled up by 30% immediately when the rolling update starts. Once old pods have been killed, new group can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of the target number of pods.

ClusterSettings

(Appears on: ElasticsearchSettings )

ClusterSettings is the cluster node in elasticsearch.yml.

Field Description

InitialMasterNodes
[]string

ElasticsearchHealth(string alias)

(Appears on: ElasticsearchStatus )

ElasticsearchHealth is the health of the cluster as returned by the health API.

ElasticsearchOrchestrationPhase(string alias)

(Appears on: ElasticsearchStatus )

ElasticsearchOrchestrationPhase is the phase Elasticsearch is in from the controller point of view.

ElasticsearchSettings

ElasticsearchSettings is a typed subset of elasticsearch.yml for purposes of the operator.

Field Description

Node
Node

Cluster
ClusterSettings

ElasticsearchSpec

(Appears on: Elasticsearch )

ElasticsearchSpec defines the desired state of Elasticsearch

Field Description

version
string

Version represents the version of the stack

image
string

Image represents the docker image that will be used.

setVmMaxMapCount
bool

SetVMMaxMapCount indicates whether an init container should be used to ensure that the vm.max_map_count is set according to https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html. Setting this to true requires the kubelet to allow running privileged containers. Defaults to true if not specified. To be disabled, it must be explicitly set to false.

http
HTTPConfig

HTTP contains settings for HTTP.

nodes
[NodeSpec]

Nodes represents a list of groups of nodes with the same configuration to be part of the cluster

featureFlags
FeatureFlags

FeatureFlags are instance-specific flags that enable or disable specific experimental features

updateStrategy
UpdateStrategy

UpdateStrategy specifies how updates to the cluster should be performed.

podDisruptionBudget
PodDisruptionBudgetTemplate

(Optional) PodDisruptionBudget allows full control of the default pod disruption budget.<br/><br/>The default budget selects all cluster pods and sets maxUnavailable to 1. To disable it entirely, set to the empty value ({} in YAML).

secureSettings
SecretRef

SecureSettings reference a secret containing secure settings, to be injected into Elasticsearch keystore on each node. Each individual key/value entry in the referenced secret is considered as an individual secure setting to be injected. The secret must exist in the same namespace as the Elasticsearch resource.

ElasticsearchStatus

(Appears on: Elasticsearch )

ElasticsearchStatus defines the observed state of Elasticsearch

Field Description

ReconcilerStatus
ReconcilerStatus

clusterUUID
string

masterNode
string

service
string

zenDiscovery
ZenDiscoveryStatus

GroupingDefinition

(Appears on: UpdateStrategy )

GroupingDefinition is used to select a group of pods.

Field Description

Selector is the selector used to match pods.

Node

(Appears on: ElasticsearchSettings )

Node is the node section in elasticsearch.yml.

Field Description

Master
bool

Data
bool

Ingest
bool

ML
bool

NodeSpec

(Appears on: ElasticsearchSpec )

NodeSpec defines a common topology for a set of Elasticsearch nodes

Field Description

name
string

Name is a logical name for this set of nodes. Used as a part of the managed Elasticsearch node.name setting. TODO: refactor and explain name length conventions

config
Config

Config represents Elasticsearch configuration.

nodeCount
int32

NodeCount defines how many nodes have this topology

(Optional) PodTemplate can be used to propagate configuration to Elasticsearch pods. This allows specifying custom annotations, labels, environment variables, volumes, affinity, resources, etc. for the pods created from this NodeSpec.

volumeClaimTemplates
[Kubernetes core/v1.PersistentVolumeClaim]

(Optional) VolumeClaimTemplates is a list of claims that pods are allowed to reference. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. TODO: Define the behavior if a claim already exists with the same name. TODO: define special behavior based on claim metadata.name. (e.g data / logs volumes)

UpdateStrategy

(Appears on: ElasticsearchSpec )

UpdateStrategy specifies how updates to the cluster should be performed.

Field Description

groups
[GroupingDefinition]

Groups is a list of groups that should have their cluster mutations considered in a fair manner with a strict change budget (not allowing any surge or unavailability) before the entire cluster is reconciled with the full change budget.

changeBudget
ChangeBudget

ChangeBudget is the change budget that should be used when performing mutations to the cluster.

ZenDiscoveryStatus

(Appears on: ElasticsearchStatus )

Field Description

minimumMasterNodes
int

kibana.k8s.elastic.co/v1alpha1

Package v1alpha1 contains API Schema definitions for the kibana v1alpha1 API group

Resource Types

Kibana

Kibana

Kibana is the Schema for the kibanas API

Field Description

apiVersion
string

kibana.k8s.elastic.co/v1alpha1

kind
string

Kibana

Refer to the Kubernetes API documentation for the fields of the metadata field.

spec
KibanaSpec

version string

Version represents the version of Kibana

image string

Image represents the docker image that will be used.

nodeCount int32

NodeCount defines how many nodes the Kibana deployment must have.

elasticsearchRef ObjectSelector

ElasticsearchRef references an Elasticsearch resource in the Kubernetes cluster. If the namespace is not specified, the current resource namespace will be used.

elasticsearch BackendElasticsearch

(Optional) Elasticsearch configures how Kibana connects to Elasticsearch

config Config

Config represents Kibana configuration.

http HTTPConfig

HTTP contains settings for HTTP.

podTemplate Kubernetes core/v1.PodTemplateSpec

(Optional) PodTemplate can be used to propagate configuration to Kibana pods. This allows specifying custom annotations, labels, environment variables, affinity, resources, etc. for the pods created from this NodeSpec.

secureSettings SecretRef

SecureSettings reference a secret containing secure settings, to be injected into Kibana keystore on each node. Each individual key/value entry in the referenced secret is considered as an individual secure setting to be injected. The secret must exist in the same namespace as the Kibana resource.

featureFlags FeatureFlags

FeatureFlags are instance-specific flags that enable or disable specific experimental features

status
KibanaStatus

BackendElasticsearch

(Appears on: KibanaSpec )

BackendElasticsearch contains configuration for an Elasticsearch backend for Kibana

Field Description

url
string

ElasticsearchURL is the URL to the target Elasticsearch

Auth configures authentication for Kibana to use.

certificateAuthorities
SecretRef

CertificateAuthorities names a secret that contains a CA file entry to use.

KibanaHealth(string alias)

(Appears on: KibanaStatus )

KibanaHealth expresses the status of the Kibana instances.

KibanaSpec

(Appears on: Kibana )

KibanaSpec defines the desired state of Kibana

Field Description

version
string

Version represents the version of Kibana

image
string

Image represents the docker image that will be used.

nodeCount
int32

NodeCount defines how many nodes the Kibana deployment must have.

elasticsearchRef
ObjectSelector

ElasticsearchRef references an Elasticsearch resource in the Kubernetes cluster. If the namespace is not specified, the current resource namespace will be used.

elasticsearch
BackendElasticsearch

(Optional) Elasticsearch configures how Kibana connects to Elasticsearch

config
Config

Config represents Kibana configuration.

http
HTTPConfig

HTTP contains settings for HTTP.

(Optional) PodTemplate can be used to propagate configuration to Kibana pods. This allows specifying custom annotations, labels, environment variables, affinity, resources, etc. for the pods created from this NodeSpec.

secureSettings
SecretRef

SecureSettings reference a secret containing secure settings, to be injected into Kibana keystore on each node. Each individual key/value entry in the referenced secret is considered as an individual secure setting to be injected. The secret must exist in the same namespace as the Kibana resource.

featureFlags
FeatureFlags

FeatureFlags are instance-specific flags that enable or disable specific experimental features

KibanaStatus

(Appears on: Kibana )

KibanaStatus defines the observed state of Kibana

Field Description

ReconcilerStatus
ReconcilerStatus

health
KibanaHealth

associationStatus
AssociationStatus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment