v1alpha1

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FnConfigGroup      = "fn.kptgen.dev"
	FnConfigVersion    = "v1alpha1"
	FnConfigAPIVersion = FnConfigGroup + "/" + FnConfigVersion
	DummyFnConfig      = "fn.kptgen.dev/dummy"
)
View Source
const (
	ControllerClusterRoleName = "controller"
)
View Source
const (
	FnClusterRoleKind = "ClusterRole"
)
View Source
const (
	FnConfigKind = "Config"
)
View Source
const (
	FnContainerKind = "Container"
)
View Source
const (
	FnPodKind = "Pod"
)
View Source
const (
	FnServiceKind = "Service"
)
View Source
const (
	FnWebhookKind = "Webhook"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	IssuerRef string `json:"issuerRef,omitempty" yaml:"issuerRef,omitempty"`
}

type ClusterRole

type ClusterRole struct {
	Spec *ClusterRoleSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
}

type ClusterRoleSpec

type ClusterRoleSpec struct {
	// PermissionRequests for RBAC rules
	// +optional
	PermissionRequests map[string][]rbacv1.PolicyRule `json:"permissionRequests,omitempty"`
}

type Config

type Config struct {
	Spec *ConfigSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
}

type ConfigSpec

type ConfigSpec struct {
	// selector
	Selector Selector `json:"selector,omitempty" yaml:"selector,omitempty"`

	// webhook
	Webhook bool `json:"webhook,omitempty" yaml:"webhook,omitempty"`

	// volume
	Volume bool `json:"volume,omitempty" yaml:"volume,omitempty"`

	// service
	Services []corev1.Service `json:"services,omitempty" yaml:"services,omitempty"`

	// sertifcate
	Certificate Certificate `json:"certificate,omitempty" yaml:"certificate,omitempty"`

	// ClusterRoles requested bindings
	ClusterRoles []string `json:"clusterRoles,omitempty" yaml:"clusterRoles,omitempty"`

	// PermissionRequests for RBAC rules
	// +optional
	PermissionRequests map[string][]rbacv1.PolicyRule `json:"permissionRequests,omitempty"`

	// Containers identifies the containers in the pod
	Containers []corev1.Container `json:"containers,omitempty"`
}

type Container

type Container struct {
	Spec *ContainerSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
}

type ContainerSpec

type ContainerSpec struct {
	// selector
	Selector Selector `json:"selector,omitempty" yaml:"selector,omitempty"`

	// ClusterRoles requested bindings
	ClusterRoles []string `json:"clusterRoles,omitempty" yaml:"clusterRoles,omitempty"`

	// PermissionRequests for RBAC rules
	// +optional
	PermissionRequests map[string][]rbacv1.PolicyRule `json:"permissionRequests,omitempty"`

	// Containers identifies the containers in the pod
	Containers []corev1.Container `json:"containers,omitempty"`

	// Services identifies the services the container exposes
	Services []corev1.Service `json:"services,omitempty"`
}

type DeploymentType

type DeploymentType string
const (
	DeploymentTypeStatefulset DeploymentType = "statefulset"
	DeploymentTypeDeployment  DeploymentType = "deployment"
)

type Pod

type Pod struct {
	Spec *PodSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
}

type PodSpec

type PodSpec struct {
	// Type is the type of the deployment
	// +kubebuilder:validation:Enum=`statefulset`;`deployment`
	// +kubebuilder:default=deployment
	Type DeploymentType `json:"type,omitempty"`

	// Replicas defines the amount of replicas expected
	// +kubebuilder:default=1
	Replicas *int32 `json:"replicas,omitempty"`

	// MaxReplicas defines the max expected replications of this pod
	// +kubebuilder:default=8
	MaxReplicas *int32 `json:"maxReplicas,omitempty"`

	// MaxJobNumber indication on how many jobs a given pods should hold
	MaxJobNumber *int32 `json:"maxJobNumber,omitempty"`

	// ClusterRoles requested bindings
	ClusterRoles []string `json:"clusterRoles,omitempty" yaml:"clusterRoles,omitempty"`

	// PermissionRequests for RBAC rules required for this controller to function.
	// +optional
	PermissionRequests map[string]*PolicyRules `json:"permissionRequests,omitempty"`

	// pods define the pod specification used by the controller for LCM/resource allocation
	PodTemplate corev1.PodTemplateSpec `json:"template,omitempty"`
	// Services identifies the services the pod exposes
	Services []corev1.Service `json:"services,omitempty"`
}

type PolicyRules added in v0.0.9

type PolicyRules struct {
	// Scope defines the scope of the policy rules
	// +kubebuilder:validation:Enum=`namespace`;`cluster`
	// +kubebuilder:default=namespace
	Scope PolicyScope `json:"scope,omitempty"`
	// rules is the set of rules the permissions requests should fullfil
	Permissions []rbacv1.PolicyRule `json:"permissions"`
}

type PolicyScope added in v0.0.9

type PolicyScope string
const (
	PolicyScopeCluster   PolicyScope = "cluster"
	PolicyScopeNamespace PolicyScope = "namespace"
)

type Selector

type Selector struct {
	// ResId refers to a GVKN/Ns of a resource.
	resid.ResId `json:",inline,omitempty" yaml:",inline,omitempty"`

	ContainerName string `json:"containerName,omitempty" yaml:"containerName,omitempty"`
}

type Service

type Service struct {
	Spec *ServiceSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
}

type ServiceSpec

type ServiceSpec struct {
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// selector
	Selector Selector `json:"selector,omitempty" yaml:"selector,omitempty"`
	// service
	Services []corev1.Service `json:"services,omitempty"`
}

type Webhook

type Webhook struct {
	Spec *WebhookSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
}

type WebhookSpec

type WebhookSpec struct {
	// selector
	Selector Selector `json:"selector,omitempty" yaml:"selector,omitempty"`
	// service
	Services []corev1.Service `json:"services,omitempty"`
	// sertifcate
	Certificate Certificate `json:"certificate,omitempty" yaml:"certificate,omitempty"`
}

Jump to

Keyboard shortcuts

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