Dagger
Search

istio

The GetLatestVersion function returns the latest Istio version released on GitHub. The GetLocalVersion function reads the local Istio version from the provided ConfigMap file. The IsNewerVersion function compares the latest Istio version with the local version and returns true if the latest version is newer.

Installation

dagger install github.com/adore-me/daggerverse/istio@a706d2cad3d7ccfec76857268df0edb11a6b1a1f

Entrypoint

Return Type
Istio !
Arguments
NameTypeDescription
cmPathString ConfigMap (that stores istio current version) file path. Should be relative to the dir parameter.
dirDirectory !RepoDir with all the kube YAML resources. Usually the root directory of the workdir.
Example
func (m *myModule) example(dir *Directory) *Istio  {
	return dag.
			Istio(dir)
}
@function
def example(dir: dagger.Directory) -> dag.Istio:
	return (
		dag.istio(dir)
	)
@func()
example(dir: Directory): Istio {
	return dag
		.istio(dir)
}

Types

Istio 🔗

isNewerVersion() 🔗

IsNewerVersion Check if the latest Istio version is newer than the local version

Example usage: dagger call –cm-path=clusters/dev/istio-version.yaml –dir=. is-new-version

Return Type
Boolean !
Example
dagger -m github.com/adore-me/daggerverse/istio@a706d2cad3d7ccfec76857268df0edb11a6b1a1f call \
 --dir DIR_PATH is-newer-version
func (m *myModule) example(ctx context.Context, dir *Directory) bool  {
	return dag.
			Istio(dir).
			IsNewerVersion(ctx)
}
@function
async def example(dir: dagger.Directory) -> bool:
	return await (
		dag.istio(dir)
		.is_newer_version()
	)
@func()
async example(dir: Directory): Promise<boolean> {
	return dag
		.istio(dir)
		.isNewerVersion()
}

updateVersionCm() 🔗

UpdateVersionCm Update the version in the ConfigMap file

Example usage: dagger call –cm-path=clusters/dev/istio-version.yaml –dir=. update-version-cm

Return Type
String !
Example
dagger -m github.com/adore-me/daggerverse/istio@a706d2cad3d7ccfec76857268df0edb11a6b1a1f call \
 --dir DIR_PATH update-version-cm
func (m *myModule) example(ctx context.Context, dir *Directory) string  {
	return dag.
			Istio(dir).
			UpdateVersionCm(ctx)
}
@function
async def example(dir: dagger.Directory) -> str:
	return await (
		dag.istio(dir)
		.update_version_cm()
	)
@func()
async example(dir: Directory): Promise<string> {
	return dag
		.istio(dir)
		.updateVersionCm()
}

createUpdatePr() 🔗

Return Type
String !
Example
dagger -m github.com/adore-me/daggerverse/istio@a706d2cad3d7ccfec76857268df0edb11a6b1a1f call \
 --dir DIR_PATH create-update-pr
func (m *myModule) example(ctx context.Context, dir *Directory) string  {
	return dag.
			Istio(dir).
			CreateUpdatePr(ctx)
}
@function
async def example(dir: dagger.Directory) -> str:
	return await (
		dag.istio(dir)
		.create_update_pr()
	)
@func()
async example(dir: Directory): Promise<string> {
	return dag
		.istio(dir)
		.createUpdatePr()
}