Documentation ¶
Index ¶
- Constants
- Variables
- func GetConfigMapVolume(key string, arg *ConfigMapVolumeArgs) corev1.Volume
- func NewConfigMap(args *ConfigMapArgs) corev1.ConfigMap
- func NewContainer(args *DeploymentArgs) []corev1.Container
- func NewContainerPort(ports map[string]int32) []corev1.ContainerPort
- func NewDeployment(args *DeploymentArgs) appsv1.Deployment
- func NewDeploymentSpec(args *DeploymentArgs) appsv1.DeploymentSpec
- func NewKafkaTopic(args *KafkaTopicArgs) crd.KafkaTopic
- func NewLabelSelector(matchLabels map[string]string) *metav1.LabelSelector
- func NewLocalObjectReference(name string) *corev1.LocalObjectReference
- func NewNamespace(args *NamespaceArgs) corev1.Namespace
- func NewNetworkChaos(args *NetworkChaosArgs) crd.NetworkChaos
- func NewNetworkChaosSpec(args *NetworkChaosArgs) crd.NetworkChaosSpec
- func NewObjectMeta(options ObjectMetaOptions) metav1.ObjectMeta
- func NewPodSpec(args *DeploymentArgs) corev1.PodSpec
- func NewPodTemplate(args *DeploymentArgs) corev1.PodTemplateSpec
- func NewReadinessProbe(args *DeploymentArgs) *corev1.Probe
- func NewSerivce(args *ServiceArgs) corev1.Service
- func NewServiceMonitor(args *ServiceMonitorArgs) promv1.ServiceMonitor
- func NewServicePort(ports map[string]int32) []corev1.ServicePort
- func NewTopologySpreadConstraint(args *DeploymentArgs) []corev1.TopologySpreadConstraint
- func NewTypeMeta(kind string, apiVersion string) metav1.TypeMeta
- func NewVolume(configVolumeArgs *ConfigMapVolumeArgs) []corev1.Volume
- func NewVolumeMount(volumes map[string]string) []corev1.VolumeMount
- type ConfigMapArgs
- type ConfigMapVolumeArgs
- type DeploymentArgs
- type KafkaTopicArgs
- type NamespaceArgs
- type NetworkChaosArgs
- type ObjectMetaOptions
- type ServiceArgs
- type ServiceMonitorArgs
- type ServiceUnitVariantValues
Constants ¶
const HostnameLabel = "kubernetes.io/hostname"
const LabelPrefix = "hexagon.hanapedia.link"
const METRICS_PORT_NAME = "metrics"
Variables ¶
var AppLabel = fmt.Sprintf("%v/app", LabelPrefix)
var ServiceUnitVariantLabel = fmt.Sprintf("%v/variant", LabelPrefix)
Functions ¶
func GetConfigMapVolume ¶
func GetConfigMapVolume(key string, arg *ConfigMapVolumeArgs) corev1.Volume
GetConfigMapVolume creates the cofigmap volume entry
func NewConfigMap ¶
func NewConfigMap(args *ConfigMapArgs) corev1.ConfigMap
NewConfigMap create config map
func NewContainer ¶
func NewContainer(args *DeploymentArgs) []corev1.Container
NewContainer create container
func NewContainerPort ¶
func NewContainerPort(ports map[string]int32) []corev1.ContainerPort
NewContainerPort create container port slice
func NewDeployment ¶
func NewDeployment(args *DeploymentArgs) appsv1.Deployment
NewDeployment create Deployment
func NewDeploymentSpec ¶
func NewDeploymentSpec(args *DeploymentArgs) appsv1.DeploymentSpec
NewDeploymentSpec create deployment specs
func NewKafkaTopic ¶
func NewKafkaTopic(args *KafkaTopicArgs) crd.KafkaTopic
NewKafkaTopic creates kafka topic custom resource defined by strimzi.io
func NewLabelSelector ¶
func NewLabelSelector(matchLabels map[string]string) *metav1.LabelSelector
NewLabelSelector create lable selector
func NewLocalObjectReference ¶
func NewLocalObjectReference(name string) *corev1.LocalObjectReference
NewLocalObjectReference create lable selector
func NewNamespace ¶
func NewNamespace(args *NamespaceArgs) corev1.Namespace
NewNamespace create type namespace kubernetes objects.
func NewNetworkChaos ¶
func NewNetworkChaos(args *NetworkChaosArgs) crd.NetworkChaos
NewNetworkChaos create type network chaos kubernetes custom resource objects for chaos-mesh.
func NewNetworkChaosSpec ¶
func NewNetworkChaosSpec(args *NetworkChaosArgs) crd.NetworkChaosSpec
NewNetworkChaosSpec create type namespace kubernetes objects.
func NewObjectMeta ¶
func NewObjectMeta(options ObjectMetaOptions) metav1.ObjectMeta
NewObjectMeta object meta data with name and namespace
func NewPodTemplate ¶
func NewPodTemplate(args *DeploymentArgs) corev1.PodTemplateSpec
NewPodTemplate create pod template
func NewReadinessProbe ¶ added in v1.0.14
func NewReadinessProbe(args *DeploymentArgs) *corev1.Probe
TODO: parameterize magic number
func NewSerivce ¶
func NewSerivce(args *ServiceArgs) corev1.Service
NewSerivce create new service api object
func NewServiceMonitor ¶ added in v1.0.10
func NewServiceMonitor(args *ServiceMonitorArgs) promv1.ServiceMonitor
NewServiceMonitor creates ServiceMonitor Custom Resource defined by github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring
func NewServicePort ¶
func NewServicePort(ports map[string]int32) []corev1.ServicePort
NewServicePort create service port slice
func NewTopologySpreadConstraint ¶ added in v1.0.10
func NewTopologySpreadConstraint(args *DeploymentArgs) []corev1.TopologySpreadConstraint
TODO: parameterize magic number
func NewTypeMeta ¶
NewTypeMeta create type meta for all kubernetes objects.
func NewVolume ¶
func NewVolume(configVolumeArgs *ConfigMapVolumeArgs) []corev1.Volume
NewVolume create volume
func NewVolumeMount ¶
func NewVolumeMount(volumes map[string]string) []corev1.VolumeMount
NewVolumeMount create container port slice
Types ¶
type ConfigMapArgs ¶
type ConfigMapVolumeArgs ¶
type DeploymentArgs ¶
type DeploymentArgs struct { Name string Namespace string Annotations map[string]string Image string Replicas int32 Resource *corev1.ResourceRequirements Ports map[string]int32 VolumeMounts map[string]string Envs []corev1.EnvVar ConfigVolume *ConfigMapVolumeArgs EnableTopologySpreadConstraint bool DisableReadinessProbe bool ReadinessProbePort intstr.IntOrString }
type KafkaTopicArgs ¶
type NamespaceArgs ¶
type NetworkChaosArgs ¶
type ObjectMetaOptions ¶
type ServiceArgs ¶
type ServiceMonitorArgs ¶ added in v1.0.10
type ServiceUnitVariantValues ¶ added in v1.0.10
type ServiceUnitVariantValues float64
const ( STATELESS ServiceUnitVariantValues = iota STATEFULL LOAD_GENERATOR )
func (ServiceUnitVariantValues) AsString ¶ added in v1.0.10
func (suvv ServiceUnitVariantValues) AsString() string