Documentation ¶
Index ¶
- Constants
- func NewConfigMap(namespace, name string, opts ...ConfigMapOption) *corev1.ConfigMap
- func NewContainer(name, image string, opts ...ContainerOption) *corev1.Container
- func NewDeployment(namespace, name string, opts ...DeploymentOption) *appsv1.Deployment
- func NewMeta(ns, name string, opts ...MetaOption) *metav1.ObjectMeta
- func NewPodSpec(opts ...PodSpecOption) *corev1.PodSpec
- func NewRoleBinding(namespace, name, roleName, subjectName string, opts ...RoleBindingOption) *rbacv1.RoleBinding
- func NewSecret(namespace, name string, opts ...SecretOption) *corev1.Secret
- func NewService(namespace, name string, opts ...ServiceOption) *corev1.Service
- func NewServiceAccount(namespace, name string, opts ...ServiceAccountOption) *corev1.ServiceAccount
- func NewVolume(name string, opts ...VolumeOption) *corev1.Volume
- func NewVolumeMount(name, mountPath string, opts ...VolumeMountOption) *corev1.VolumeMount
- type ConfigMapOption
- type ContainerOption
- func ContainerAddArgs(s string) ContainerOption
- func ContainerAddEnvFromFieldRef(name, path string) ContainerOption
- func ContainerAddEnvFromValue(name, value string) ContainerOption
- func ContainerAddEnvVarFromSecret(name, secretName, secretKey string) ContainerOption
- func ContainerAddPort(name string, containerPort int32) ContainerOption
- func ContainerAddVolumeMount(vm *corev1.VolumeMount) ContainerOption
- func ContainerWithImagePullPolicy(policy corev1.PullPolicy) ContainerOption
- type DeploymentOption
- type MetaOption
- type PodSpecOption
- type PodTemplateSpecOption
- type RoleBindingOption
- type SecretOption
- type ServiceAccountOption
- type ServiceOption
- type VolumeMountOption
- type VolumeOption
Constants ¶
View Source
const ( // appNameLabel is the name of the application. AppNameLabel = "app.kubernetes.io/name" // appInstanceLabel is a unique name identifying the instance of an application. AppInstanceLabel = "app.kubernetes.io/instance" // appComponentLabel is the component within the architecture. AppComponentLabel = "app.kubernetes.io/component" // appPartOfLabel is the name of a higher level application this one is part of. AppPartOfLabel = "app.kubernetes.io/part-of" // appManagedByLabel is the tool being used to manage the operation of an application. AppManagedByLabel = "app.kubernetes.io/managed-by" )
Kubernetes recommended labels https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
View Source
const ( PartOf = "triggermesh" ManagedBy = "triggermesh-core" )
Common label values
Variables ¶
This section is empty.
Functions ¶
func NewConfigMap ¶ added in v1.5.3
func NewConfigMap(namespace, name string, opts ...ConfigMapOption) *corev1.ConfigMap
func NewContainer ¶
func NewContainer(name, image string, opts ...ContainerOption) *corev1.Container
func NewDeployment ¶
func NewDeployment(namespace, name string, opts ...DeploymentOption) *appsv1.Deployment
func NewMeta ¶
func NewMeta(ns, name string, opts ...MetaOption) *metav1.ObjectMeta
func NewPodSpec ¶
func NewPodSpec(opts ...PodSpecOption) *corev1.PodSpec
func NewRoleBinding ¶
func NewRoleBinding(namespace, name, roleName, subjectName string, opts ...RoleBindingOption) *rbacv1.RoleBinding
func NewService ¶
func NewService(namespace, name string, opts ...ServiceOption) *corev1.Service
func NewServiceAccount ¶
func NewServiceAccount(namespace, name string, opts ...ServiceAccountOption) *corev1.ServiceAccount
func NewVolumeMount ¶
func NewVolumeMount(name, mountPath string, opts ...VolumeMountOption) *corev1.VolumeMount
Types ¶
type ConfigMapOption ¶ added in v1.5.3
func ConfigMapWithMetaOptions ¶ added in v1.5.3
func ConfigMapWithMetaOptions(opts ...MetaOption) ConfigMapOption
type ContainerOption ¶
func ContainerAddArgs ¶
func ContainerAddArgs(s string) ContainerOption
func ContainerAddEnvFromFieldRef ¶
func ContainerAddEnvFromFieldRef(name, path string) ContainerOption
func ContainerAddEnvFromValue ¶
func ContainerAddEnvFromValue(name, value string) ContainerOption
func ContainerAddEnvVarFromSecret ¶
func ContainerAddEnvVarFromSecret(name, secretName, secretKey string) ContainerOption
func ContainerAddPort ¶
func ContainerAddPort(name string, containerPort int32) ContainerOption
func ContainerAddVolumeMount ¶
func ContainerAddVolumeMount(vm *corev1.VolumeMount) ContainerOption
func ContainerWithImagePullPolicy ¶
func ContainerWithImagePullPolicy(policy corev1.PullPolicy) ContainerOption
type DeploymentOption ¶
type DeploymentOption func(*appsv1.Deployment)
func DeploymentAddSelectorForTemplate ¶
func DeploymentAddSelectorForTemplate(key, value string) DeploymentOption
func DeploymentSetReplicas ¶
func DeploymentSetReplicas(replicas int32) DeploymentOption
func DeploymentWithMetaOptions ¶
func DeploymentWithMetaOptions(opts ...MetaOption) DeploymentOption
func DeploymentWithTemplateSpecOptions ¶
func DeploymentWithTemplateSpecOptions(opts ...PodTemplateSpecOption) DeploymentOption
type MetaOption ¶
type MetaOption func(*metav1.ObjectMeta)
func MetaAddLabel ¶
func MetaAddLabel(key, value string) MetaOption
func MetaAddOwner ¶
func MetaAddOwner(o metav1.Object, gvk schema.GroupVersionKind) MetaOption
func MetaSetDeletion ¶ added in v1.3.0
func MetaSetDeletion(t *metav1.Time) MetaOption
type PodSpecOption ¶
func PodSpecAddContainer ¶
func PodSpecAddContainer(c *corev1.Container) PodSpecOption
func PodSpecAddVolume ¶
func PodSpecAddVolume(v *corev1.Volume) PodSpecOption
func PodSpecWithServiceAccountName ¶
func PodSpecWithServiceAccountName(saName string) PodSpecOption
type PodTemplateSpecOption ¶
type PodTemplateSpecOption func(*corev1.PodTemplateSpec)
func PodTemplateSpecWithMetaOptions ¶
func PodTemplateSpecWithMetaOptions(opts ...MetaOption) PodTemplateSpecOption
func PodTemplateSpecWithPodSpecOptions ¶
func PodTemplateSpecWithPodSpecOptions(opts ...PodSpecOption) PodTemplateSpecOption
type RoleBindingOption ¶
type RoleBindingOption func(*rbacv1.RoleBinding)
func RoleBindingWithMetaOptions ¶
func RoleBindingWithMetaOptions(opts ...MetaOption) RoleBindingOption
type SecretOption ¶
func SecretSetData ¶
func SecretSetData(key string, value []byte) SecretOption
func SecretWithMetaOptions ¶
func SecretWithMetaOptions(opts ...MetaOption) SecretOption
type ServiceAccountOption ¶
type ServiceAccountOption func(*corev1.ServiceAccount)
func ServiceAccountWithMetaOptions ¶
func ServiceAccountWithMetaOptions(opts ...MetaOption) ServiceAccountOption
type ServiceOption ¶
func ServiceAddPort ¶
func ServiceAddPort(name string, port int32, targetPort int32) ServiceOption
func ServiceAddSelectorLabel ¶
func ServiceAddSelectorLabel(key, value string) ServiceOption
func ServiceSetType ¶
func ServiceSetType(st corev1.ServiceType) ServiceOption
func ServiceWithMetaOptions ¶
func ServiceWithMetaOptions(opts ...MetaOption) ServiceOption
type VolumeMountOption ¶
type VolumeMountOption func(*corev1.VolumeMount)
func VolumeMountWithReadOnlyOption ¶
func VolumeMountWithReadOnlyOption(b bool) VolumeMountOption
type VolumeOption ¶
func VolumeFromSecretOption ¶
func VolumeFromSecretOption(secretName, secretKey, mountFile string) VolumeOption
Click to show internal directories.
Click to hide internal directories.