inject

package
v0.0.0-...-19badf1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 17 Imported by: 0

Documentation

Overview

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	// JSONFormat is the json format
	JSONFormat = "json"
	// YAMLFormat is the yaml format
	YAMLFormat = "yaml"
)

Functions

func GetWorkloadObj

func GetWorkloadObj(workload string) (*unstructured.Unstructured, error)

GetWorkloadObj returns the unstructured object of the workload

func InjectSidecarConfig

func InjectSidecarConfig(sidecar *v1alpha1.Sidecar, workloadObj,
	sidecarObj *unstructured.Unstructured,
) error

InjectSidecarConfig injects the sidecar config into the workload

func NewInjectArgoWorkflowCmd

func NewInjectArgoWorkflowCmd() *cobra.Command

func NewInjectCmd

func NewInjectCmd() *cobra.Command

Types

type OutputManifests

type OutputManifests struct {
	// Workload is the json string of the injected workload
	// which contains the vineyard sidecar container
	Workload string `json:"workload"`

	// RPCService is the json string of the rpc service of the
	// injected vineyard sidecar container
	RPCService string `json:"rpc_service"`

	// EtcdService is the json string of the etcd service of the
	// injected vineyard sidecar container, which is used to connect
	// the other vineyard sidecar containers when the workload uses
	// the internal etcd cluster or connects to the external etcd cluster
	// when the workload uses the external etcd cluster
	EtcdService string `json:"etcd_service"`

	// EtcdInternalServiceJSON is the json string of the etcd service
	// which is used as the internal service to build a etcd cluster
	// for vineyard sidecar container
	EtcdInternalService []string `json:"etcd_internal_service"`

	// EtcdPodJSON is the json string of the etcd pod
	// which is used as the external etcd cluster
	EtcdPod []string `json:"etcd_pod"`
}

OutputManifests contains all output json string of the injection

func GetManifestFromTemplate

func GetManifestFromTemplate(workload string) (OutputManifests, error)

GetManifestFromTemplate returns the manifests from the template

Jump to

Keyboard shortcuts

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