common

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 6 Imported by: 9

Documentation

Overview

Package common contains code and configuration common to all adapters that can either be used directly or as examples.

Index

Constants

View Source
const (

	// Common Operations
	BookInfoOperation  = "bookinfo"
	HTTPBinOperation   = "httpbin"
	ImageHubOperation  = "imagehub"
	EmojiVotoOperation = "emojivoto"

	// Validate Operations
	SmiConformanceOperation = "smi_conformance"

	// Custom Operation
	CustomOperation = "custom"

	// Additional Properties
	ServiceName = "service_name"
)

Variables

View Source
var (

	// DefaultOpts is an example of options to be injected into a config providers.
	DefaultOpts = configprovider.Options{
		ServerConfig:   defaultServerConfig,
		MeshSpec:       defaultMeshSpec,
		ProviderConfig: defaultProviderConfig,
		Operations:     Operations,
	}
)

The values provided here are examples of config objects that can be used as a starting point for adapter specific configuration. Note that most of the entries given here are mandatory. For more information about the various config option groups, see the config/provider package.

View Source
var (
	Operations = adapter.Operations{
		BookInfoOperation: &adapter.Operation{
			Type:        int32(meshes.OpCategory_SAMPLE_APPLICATION),
			Description: "Istio Book Info Application",
			Versions:    adapter.NoneVersion,
			Templates: []adapter.Template{
				"https://raw.githubusercontent.com/istio/istio/master/samples/bookinfo/platform/kube/bookinfo.yaml",
			},
			AdditionalProperties: map[string]string{
				ServiceName: BookInfoOperation,
			},
		},
		HTTPBinOperation: &adapter.Operation{
			Type:        int32(meshes.OpCategory_SAMPLE_APPLICATION),
			Description: "HTTPBin Application",
			Versions:    adapter.NoneVersion,
			Templates: []adapter.Template{
				"https://raw.githubusercontent.com/istio/istio/master/samples/httpbin/httpbin.yaml",
			},
			AdditionalProperties: map[string]string{
				ServiceName: HTTPBinOperation,
			},
		},
		ImageHubOperation: &adapter.Operation{
			Type:        int32(meshes.OpCategory_SAMPLE_APPLICATION),
			Description: "Image Hub Application",
			Versions:    adapter.NoneVersion,
			Templates: []adapter.Template{
				"https://raw.githubusercontent.com/layer5io/image-hub/master/deployment.yaml",
			},
			AdditionalProperties: map[string]string{
				ServiceName: ImageHubOperation,
			},
		},
		EmojiVotoOperation: &adapter.Operation{
			Type:        int32(meshes.OpCategory_SAMPLE_APPLICATION),
			Description: "EmojiVoto Application",
			Versions:    adapter.NoneVersion,
			Templates: []adapter.Template{
				"https://raw.githubusercontent.com/BuoyantIO/emojivoto/main/kustomize/deployment/emoji.yml",
				"https://raw.githubusercontent.com/BuoyantIO/emojivoto/main/kustomize/deployment/vote-bot.yml",
				"https://raw.githubusercontent.com/BuoyantIO/emojivoto/main/kustomize/deployment/voting.yml",
				"https://raw.githubusercontent.com/BuoyantIO/emojivoto/main/kustomize/deployment/web.yml",
			},
			AdditionalProperties: map[string]string{
				ServiceName: EmojiVotoOperation,
			},
		},
		CustomOperation: &adapter.Operation{
			Type:        int32(meshes.OpCategory_CUSTOM),
			Description: "Custom YAML",
			Templates:   adapter.NoneTemplate,
		},

		SmiConformanceOperation: &adapter.Operation{
			Type:        int32(meshes.OpCategory_VALIDATE),
			Description: "SMI Conformance",
			Templates: []adapter.Template{
				"https://raw.githubusercontent.com/layer5io/learn-layer5/master/smi-conformance/manifest.yml",
			},
		},
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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