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@e3f36136773582f1de87cda2846e6fd5cd040837

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
dagger -m github.com/adore-me/daggerverse/istio@e3f36136773582f1de87cda2846e6fd5cd040837 call \
 --dir DIR_PATH
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 🔗

getLatestVersion() 🔗

GetLatestVersion GetLocalVersion Get the local Istio version

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

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

getLocalVersion() 🔗

GetLocalVersion Get the local Istio version

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

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

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@e3f36136773582f1de87cda2846e6fd5cd040837 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@e3f36136773582f1de87cda2846e6fd5cd040837 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@e3f36136773582f1de87cda2846e6fd5cd040837 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()
}