Skip to content
types.go 1.01 KiB
Newer Older
Timothee Gosselin's avatar
WIP
Timothee Gosselin committed
package deployment

import (
	"github.com/ankitrgadiya/operatorlib/pkg/container"
Timothee Gosselin's avatar
WIP
Timothee Gosselin committed
	"github.com/ankitrgadiya/operatorlib/pkg/interfaces"
	"github.com/ankitrgadiya/operatorlib/pkg/meta"
	"github.com/ankitrgadiya/operatorlib/pkg/pod"

	appsv1 "k8s.io/api/apps/v1"
	"k8s.io/apimachinery/pkg/runtime"
Timothee Gosselin's avatar
WIP
Timothee Gosselin committed
)

// GenConfigMapFunc defines a function which generates ConfigMap.
type GenDeploymentFunc func(Conf) (*appsv1.Deployment, error)

type Mutate interface {
	pod.Mutate
}

Timothee Gosselin's avatar
WIP
Timothee Gosselin committed
type Conf struct {
	Obj            *appsv1.Deployment
	Reconcile      interfaces.Reconcile
	previousObject runtime.Object
Timothee Gosselin's avatar
Timothee Gosselin committed

Timothee Gosselin's avatar
Timothee Gosselin committed
	Owner          interfaces.Object
	Namespace      string
	Name           string
	OwnerReference bool
	GenFinalizers  meta.GenFinalizers
	GenLabels      meta.GenLabels
	GenAnnotations meta.GenAnnotations
Timothee Gosselin's avatar
Timothee Gosselin committed

	Strategy appsv1.DeploymentStrategy

Timothee Gosselin's avatar
WIP
Timothee Gosselin committed
	GenDeploymentFunc
Timothee Gosselin's avatar
Timothee Gosselin committed

	GenContainers []container.Mutate

	GenVolumesFunc         pod.GenVolumesFunc
	GenSecurityContextFunc pod.GenSecurityContextFunc
	GenRestartPolicyFunc   pod.GenRestartPolicyFunc
Timothee Gosselin's avatar
WIP
Timothee Gosselin committed
}