Dagger
Search

operator-sdk

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/disaster37/dagger-library-go/operator-sdk@a324f57846fa658d80cb8daffedd0fbedf3b55a1

Entrypoint

Return Type
OperatorSdk !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-The source directory
containerContainer -Extra golang container
goVersionString -The go version when go.mod not yet exist
sdkVersionString -The operator-sdk cli version to use
opmVersionString -The opm cli version to use
controllerGenVersionString -The controller gen version to use
cleanCrdVersionString -The clean crd version to use
kustomizeVersionString -The kustomize version to use
dockerVersionString -The Docker version to use
Example
dagger -m github.com/disaster37/dagger-library-go/operator-sdk@a324f57846fa658d80cb8daffedd0fbedf3b55a1 call \
 --src DIR_PATH
func (m *myModule) example(src *Directory) *OperatorSdk  {
	return dag.
			OperatorSdk(src)
}
@function
def example(src: dagger.Directory, ) -> dag.OperatorSdk:
	return (
		dag.operator_sdk(src)
	)
@func()
example(src: Directory, ): OperatorSdk {
	return dag
		.operatorSdk(src)
}

Types

OperatorSdk 🔗

kube() 🔗

K3s module

Return Type
OperatorSdkKube !
Example
dagger -m github.com/disaster37/dagger-library-go/operator-sdk@a324f57846fa658d80cb8daffedd0fbedf3b55a1 call \
 --src DIR_PATH kube
func (m *myModule) example(src *Directory) *OperatorSdkKube  {
	return dag.
			OperatorSdk(src).
			Kube()
}
@function
def example(src: dagger.Directory, ) -> dag.OperatorSdkKube:
	return (
		dag.operator_sdk(src)
		.kube()
	)
@func()
example(src: Directory, ): OperatorSdkKube {
	return dag
		.operatorSdk(src)
		.kube()
}

golang() 🔗

The Golang module

Return Type
OperatorSdkGolang !
Example
dagger -m github.com/disaster37/dagger-library-go/operator-sdk@a324f57846fa658d80cb8daffedd0fbedf3b55a1 call \
 --src DIR_PATH golang
func (m *myModule) example(src *Directory) *OperatorSdkGolang  {
	return dag.
			OperatorSdk(src).
			Golang()
}
@function
def example(src: dagger.Directory, ) -> dag.OperatorSdkGolang:
	return (
		dag.operator_sdk(src)
		.golang()
	)
@func()
example(src: Directory, ): OperatorSdkGolang {
	return dag
		.operatorSdk(src)
		.golang()
}

sdk() 🔗

The SDK module

Return Type
OperatorSdkSdk !
Example
dagger -m github.com/disaster37/dagger-library-go/operator-sdk@a324f57846fa658d80cb8daffedd0fbedf3b55a1 call \
 --src DIR_PATH sdk
func (m *myModule) example(src *Directory) *OperatorSdkSdk  {
	return dag.
			OperatorSdk(src).
			Sdk()
}
@function
def example(src: dagger.Directory, ) -> dag.OperatorSdkSdk:
	return (
		dag.operator_sdk(src)
		.sdk()
	)
@func()
example(src: Directory, ): OperatorSdkSdk {
	return dag
		.operatorSdk(src)
		.sdk()
}

oci() 🔗

The OCI module

Return Type
OperatorSdkOci !
Example
dagger -m github.com/disaster37/dagger-library-go/operator-sdk@a324f57846fa658d80cb8daffedd0fbedf3b55a1 call \
 --src DIR_PATH oci
func (m *myModule) example(src *Directory) *OperatorSdkOci  {
	return dag.
			OperatorSdk(src).
			Oci()
}
@function
def example(src: dagger.Directory, ) -> dag.OperatorSdkOci:
	return (
		dag.operator_sdk(src)
		.oci()
	)
@func()
example(src: Directory, ): OperatorSdkOci {
	return dag
		.operatorSdk(src)
		.oci()
}

withSource() 🔗

WithSource permit to update source on all sub containers

Return Type
OperatorSdk !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
Example
dagger -m github.com/disaster37/dagger-library-go/operator-sdk@a324f57846fa658d80cb8daffedd0fbedf3b55a1 call \
 --src DIR_PATH with-source --src DIR_PATH
func (m *myModule) example(src *Directory, src1 *Directory) *OperatorSdk  {
	return dag.
			OperatorSdk(src).
			WithSource(src1)
}
@function
def example(src: dagger.Directory, src1: dagger.Directory) -> dag.OperatorSdk:
	return (
		dag.operator_sdk(src)
		.with_source(src1)
	)
@func()
example(src: Directory, src1: Directory): OperatorSdk {
	return dag
		.operatorSdk(src)
		.withSource(src1)
}

installOlmOperator() 🔗

Return Type
Service !
Arguments
NameTypeDefault ValueDescription
catalogImageString !-The catalog image to install
nameString !-The operator name
channelString "stable"The channel of the operator to install
Example
dagger -m github.com/disaster37/dagger-library-go/operator-sdk@a324f57846fa658d80cb8daffedd0fbedf3b55a1 call \
 --src DIR_PATH install-olm-operator --catalog-image string --name string
func (m *myModule) example(src *Directory, catalogImage string, name string) *Service  {
	return dag.
			OperatorSdk(src).
			InstallOlmOperator(catalogImage, name)
}
@function
def example(src: dagger.Directory, catalog_image: str, name: str) -> dagger.Service:
	return (
		dag.operator_sdk(src)
		.install_olm_operator(catalog_image, name)
	)
@func()
example(src: Directory, catalogImage: string, name: string): Service {
	return dag
		.operatorSdk(src)
		.installOlmOperator(catalogImage, name)
}

release() 🔗

Release permit to release to operator version

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
versionString !-The version to release
previousVersionString -The previous version to replace
crdVersionString -The CRD version do generate manifests
channelsString -The list of channel. Comma separated
withTestBoolean -Set true to run tests
kubeVersionString -Set the kubeversion to use when run envtest
withPublishBoolean -Set true to publish the operator image, the bundle image and the catalog image
publishLastBoolean -Set true to publish the catalog with last tag
registryString !-The OCI registry
repositoryString !-The OCI repository
registryUsernameString -The registry username
registryPasswordSecret -The registry password
Example
dagger -m github.com/disaster37/dagger-library-go/operator-sdk@a324f57846fa658d80cb8daffedd0fbedf3b55a1 call \
 --src DIR_PATH release --version string --registry string --repository string
func (m *myModule) example(src *Directory, version string, registry string, repository string) *Directory  {
	return dag.
			OperatorSdk(src).
			Release(version, registry, repository)
}
@function
def example(src: dagger.Directory, version: str, registry: str, repository: str) -> dagger.Directory:
	return (
		dag.operator_sdk(src)
		.release(version, registry, repository)
	)
@func()
example(src: Directory, version: string, registry: string, repository: string): Directory {
	return dag
		.operatorSdk(src)
		.release(version, registry, repository)
}

OperatorSdkKube 🔗

withSource() 🔗

Return Type
OperatorSdkKube !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-The source directory
Example
Function OperatorSdkKube.withSource is not accessible from the operator-sdk module
Function OperatorSdkKube.withSource is not accessible from the operator-sdk module
Function OperatorSdkKube.withSource is not accessible from the operator-sdk module
Function OperatorSdkKube.withSource is not accessible from the operator-sdk module

kubectl() 🔗

Return Type
Container !
Example
Function OperatorSdkKube.kubectl is not accessible from the operator-sdk module
Function OperatorSdkKube.kubectl is not accessible from the operator-sdk module
Function OperatorSdkKube.kubectl is not accessible from the operator-sdk module
Function OperatorSdkKube.kubectl is not accessible from the operator-sdk module

kubeconfig() 🔗

Return Type
File !
Arguments
NameTypeDefault ValueDescription
localBoolean -set true if expose the k3s on host
Example
Function OperatorSdkKube.kubeconfig is not accessible from the operator-sdk module
Function OperatorSdkKube.kubeconfig is not accessible from the operator-sdk module
Function OperatorSdkKube.kubeconfig is not accessible from the operator-sdk module
Function OperatorSdkKube.kubeconfig is not accessible from the operator-sdk module

kubeCluster() 🔗

Return Type
Service !
Example
Function OperatorSdkKube.kubeCluster is not accessible from the operator-sdk module
Function OperatorSdkKube.kubeCluster is not accessible from the operator-sdk module
Function OperatorSdkKube.kubeCluster is not accessible from the operator-sdk module
Function OperatorSdkKube.kubeCluster is not accessible from the operator-sdk module

kubeContainer() 🔗

Return Type
Container !
Example
Function OperatorSdkKube.kubeContainer is not accessible from the operator-sdk module
Function OperatorSdkKube.kubeContainer is not accessible from the operator-sdk module
Function OperatorSdkKube.kubeContainer is not accessible from the operator-sdk module
Function OperatorSdkKube.kubeContainer is not accessible from the operator-sdk module

OperatorSdkGolang 🔗

test() 🔗

Test permit to run golang tests It will run envtest with the kube version provided

Return Type
File !
Arguments
NameTypeDefault ValueDescription
shortBoolean -if only short running tests should be executed
shuffleBoolean -if the tests should be executed out of order
runString -run select tests only, defined using a regex
skipString -skip select tests, defined using a regex
withGotestsumBoolean -Run test with gotestsum
pathString -Path to test
withKubeversionString "latest"The Kubeversion version to use
Example
Function OperatorSdkGolang.test is not accessible from the operator-sdk module
Function OperatorSdkGolang.test is not accessible from the operator-sdk module
Function OperatorSdkGolang.test is not accessible from the operator-sdk module
Function OperatorSdkGolang.test is not accessible from the operator-sdk module

withSource() 🔗

To update the source directory

Return Type
OperatorSdkGolang !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-The source directory
Example
Function OperatorSdkGolang.withSource is not accessible from the operator-sdk module
Function OperatorSdkGolang.withSource is not accessible from the operator-sdk module
Function OperatorSdkGolang.withSource is not accessible from the operator-sdk module
Function OperatorSdkGolang.withSource is not accessible from the operator-sdk module

container() 🔗

Container permit to get Golang container

Return Type
Container !
Example
Function OperatorSdkGolang.container is not accessible from the operator-sdk module
Function OperatorSdkGolang.container is not accessible from the operator-sdk module
Function OperatorSdkGolang.container is not accessible from the operator-sdk module
Function OperatorSdkGolang.container is not accessible from the operator-sdk module

OperatorSdkSdk 🔗

container() 🔗

Return Type
Container !
Example
Function OperatorSdkSdk.container is not accessible from the operator-sdk module
Function OperatorSdkSdk.container is not accessible from the operator-sdk module
Function OperatorSdkSdk.container is not accessible from the operator-sdk module
Function OperatorSdkSdk.container is not accessible from the operator-sdk module

src() 🔗

The source directory

Return Type
Directory !
Example
Function OperatorSdkSdk.src is not accessible from the operator-sdk module
Function OperatorSdkSdk.src is not accessible from the operator-sdk module
Function OperatorSdkSdk.src is not accessible from the operator-sdk module
Function OperatorSdkSdk.src is not accessible from the operator-sdk module

version() 🔗

Version display the current version of operator-sdk cli

Return Type
String !
Example
Function OperatorSdkSdk.version is not accessible from the operator-sdk module
Function OperatorSdkSdk.version is not accessible from the operator-sdk module
Function OperatorSdkSdk.version is not accessible from the operator-sdk module
Function OperatorSdkSdk.version is not accessible from the operator-sdk module

run() 🔗

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
cmdString !-The cmd to run on container
Example
Function OperatorSdkSdk.run is not accessible from the operator-sdk module
Function OperatorSdkSdk.run is not accessible from the operator-sdk module
Function OperatorSdkSdk.run is not accessible from the operator-sdk module
Function OperatorSdkSdk.run is not accessible from the operator-sdk module

generateManifests() 🔗

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
crdVersionString -The CRD version to generate
Example
Function OperatorSdkSdk.generateManifests is not accessible from the operator-sdk module
Function OperatorSdkSdk.generateManifests is not accessible from the operator-sdk module
Function OperatorSdkSdk.generateManifests is not accessible from the operator-sdk module
Function OperatorSdkSdk.generateManifests is not accessible from the operator-sdk module

generateBundle() 🔗

Bundle generate the bundle

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
imageNameString !-The OCI operator image name without the version
versionString !-The current version
channelsString -The channels
previousVersionString -The previous version
Example
Function OperatorSdkSdk.generateBundle is not accessible from the operator-sdk module
Function OperatorSdkSdk.generateBundle is not accessible from the operator-sdk module
Function OperatorSdkSdk.generateBundle is not accessible from the operator-sdk module
Function OperatorSdkSdk.generateBundle is not accessible from the operator-sdk module

withSource() 🔗

WithSource permit to update the current source on sdk container

Return Type
OperatorSdkSdk !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-The source directory
Example
Function OperatorSdkSdk.withSource is not accessible from the operator-sdk module
Function OperatorSdkSdk.withSource is not accessible from the operator-sdk module
Function OperatorSdkSdk.withSource is not accessible from the operator-sdk module
Function OperatorSdkSdk.withSource is not accessible from the operator-sdk module

installOlm() 🔗

InstallOlm permit to install the OLM

Return Type
String !
Arguments
NameTypeDefault ValueDescription
kubeconfigFile !-The kubeconfig file to access on cluster where to install OLM
Example
Function OperatorSdkSdk.installOlm is not accessible from the operator-sdk module
Function OperatorSdkSdk.installOlm is not accessible from the operator-sdk module
Function OperatorSdkSdk.installOlm is not accessible from the operator-sdk module
Function OperatorSdkSdk.installOlm is not accessible from the operator-sdk module

OperatorSdkOci 🔗

golangContainer() 🔗

The Golang container

Return Type
Container !
Example
Function OperatorSdkOci.golangContainer is not accessible from the operator-sdk module
Function OperatorSdkOci.golangContainer is not accessible from the operator-sdk module
Function OperatorSdkOci.golangContainer is not accessible from the operator-sdk module
Function OperatorSdkOci.golangContainer is not accessible from the operator-sdk module

dockerContainer() 🔗

The Docker container

Return Type
Container !
Example
Function OperatorSdkOci.dockerContainer is not accessible from the operator-sdk module
Function OperatorSdkOci.dockerContainer is not accessible from the operator-sdk module
Function OperatorSdkOci.dockerContainer is not accessible from the operator-sdk module
Function OperatorSdkOci.dockerContainer is not accessible from the operator-sdk module

manager() 🔗

The manager image

Return Type
Container !
Example
Function OperatorSdkOci.manager is not accessible from the operator-sdk module
Function OperatorSdkOci.manager is not accessible from the operator-sdk module
Function OperatorSdkOci.manager is not accessible from the operator-sdk module
Function OperatorSdkOci.manager is not accessible from the operator-sdk module

bundle() 🔗

The bundle image

Return Type
Container !
Example
Function OperatorSdkOci.bundle is not accessible from the operator-sdk module
Function OperatorSdkOci.bundle is not accessible from the operator-sdk module
Function OperatorSdkOci.bundle is not accessible from the operator-sdk module
Function OperatorSdkOci.bundle is not accessible from the operator-sdk module

catalog() 🔗

The catalog image

Return Type
Container !
Example
Function OperatorSdkOci.catalog is not accessible from the operator-sdk module
Function OperatorSdkOci.catalog is not accessible from the operator-sdk module
Function OperatorSdkOci.catalog is not accessible from the operator-sdk module
Function OperatorSdkOci.catalog is not accessible from the operator-sdk module

withRepositoryCredentials() 🔗

Return Type
OperatorSdkOci !
Arguments
NameTypeDefault ValueDescription
urlString !-The repository URL
usernameString !-The username
passwordSecret !-The password
Example
Function OperatorSdkOci.withRepositoryCredentials is not accessible from the operator-sdk module
Function OperatorSdkOci.withRepositoryCredentials is not accessible from the operator-sdk module
Function OperatorSdkOci.withRepositoryCredentials is not accessible from the operator-sdk module
Function OperatorSdkOci.withRepositoryCredentials is not accessible from the operator-sdk module

buildManager() 🔗

BuildManager permit to build manager image

Return Type
OperatorSdkOci !
Example
Function OperatorSdkOci.buildManager is not accessible from the operator-sdk module
Function OperatorSdkOci.buildManager is not accessible from the operator-sdk module
Function OperatorSdkOci.buildManager is not accessible from the operator-sdk module
Function OperatorSdkOci.buildManager is not accessible from the operator-sdk module

publishManager() 🔗

PublishManager permit to push OCI image on registry

Return Type
String !
Arguments
NameTypeDefault ValueDescription
nameString !-The image name to push
Example
Function OperatorSdkOci.publishManager is not accessible from the operator-sdk module
Function OperatorSdkOci.publishManager is not accessible from the operator-sdk module
Function OperatorSdkOci.publishManager is not accessible from the operator-sdk module
Function OperatorSdkOci.publishManager is not accessible from the operator-sdk module

buildBundle() 🔗

BuildCatalog permit to build catalog image

Return Type
OperatorSdkOci !
Example
Function OperatorSdkOci.buildBundle is not accessible from the operator-sdk module
Function OperatorSdkOci.buildBundle is not accessible from the operator-sdk module
Function OperatorSdkOci.buildBundle is not accessible from the operator-sdk module
Function OperatorSdkOci.buildBundle is not accessible from the operator-sdk module

publishBundle() 🔗

PublishBundle permit to push OCI image on registry

Return Type
String !
Arguments
NameTypeDefault ValueDescription
nameString !-The image name to push
Example
Function OperatorSdkOci.publishBundle is not accessible from the operator-sdk module
Function OperatorSdkOci.publishBundle is not accessible from the operator-sdk module
Function OperatorSdkOci.publishBundle is not accessible from the operator-sdk module
Function OperatorSdkOci.publishBundle is not accessible from the operator-sdk module

buildCatalog() 🔗

Build the OLM catalog

Return Type
OperatorSdkOci !
Arguments
NameTypeDefault ValueDescription
catalogImageString !-The catalog image name
previousCatalogImageString -The previuous catalog image name If update 'true' and 'previousCatalogImage' not provided, it use the 'catalogImage'
bundleImageString !-The bundle image name
Example
Function OperatorSdkOci.buildCatalog is not accessible from the operator-sdk module
Function OperatorSdkOci.buildCatalog is not accessible from the operator-sdk module
Function OperatorSdkOci.buildCatalog is not accessible from the operator-sdk module
Function OperatorSdkOci.buildCatalog is not accessible from the operator-sdk module

publishCatalog() 🔗

PublishCatalog permit to publish the catalog image

Return Type
String !
Arguments
NameTypeDefault ValueDescription
nameString !-The image name to push
Example
Function OperatorSdkOci.publishCatalog is not accessible from the operator-sdk module
Function OperatorSdkOci.publishCatalog is not accessible from the operator-sdk module
Function OperatorSdkOci.publishCatalog is not accessible from the operator-sdk module
Function OperatorSdkOci.publishCatalog is not accessible from the operator-sdk module

withSource() 🔗

WithSource permit to update the current source

Return Type
OperatorSdkOci !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-The source directory
Example
Function OperatorSdkOci.withSource is not accessible from the operator-sdk module
Function OperatorSdkOci.withSource is not accessible from the operator-sdk module
Function OperatorSdkOci.withSource is not accessible from the operator-sdk module
Function OperatorSdkOci.withSource is not accessible from the operator-sdk module