workloadapi

package
v0.0.0-...-871d23e Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WorkloadType_name = map[int32]string{
		0: "DEPLOYMENT",
		1: "CRONJOB",
		2: "POD",
		3: "JOB",
	}
	WorkloadType_value = map[string]int32{
		"DEPLOYMENT": 0,
		"CRONJOB":    1,
		"POD":        2,
		"JOB":        3,
	}
)

Enum value maps for WorkloadType.

View Source
var File_source_extensions_common_workload_discovery_discovery_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Workload

type Workload struct {
	Uid string `protobuf:"bytes,20,opt,name=uid,proto3" json:"uid,omitempty"`
	// Name represents the name for the workload.
	// For Kubernetes, this is the pod name.
	// This is just for debugging and may be elided as an optimization.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Namespace represents the namespace for the workload.
	// This is just for debugging and may be elided as an optimization.
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// Address represents the IPv4/IPv6 address for the workload.
	// This should be globally unique.
	// This should not have a port number.
	// Each workload must have at least either an address or hostname; not both.
	// TODO: support dual stack by making this repeated
	// TODO: when this is repeated, update xds primary key from network/IP to network/UID
	Addresses [][]byte `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// Network represents the network this workload is on. This may be elided for the default network.
	// A (network,address) pair makeup a unique key for a workload *at a point in time*.
	Network string `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"`
	// The SPIFFE identity of the workload. The identity is joined to form spiffe://<trust_domain>/ns/<namespace>/sa/<service_account>.
	// TrustDomain of the workload. May be elided if this is the mesh wide default (typically cluster.local)
	TrustDomain string `protobuf:"bytes,6,opt,name=trust_domain,json=trustDomain,proto3" json:"trust_domain,omitempty"`
	// ServiceAccount of the workload. May be elided if this is "default"
	ServiceAccount string `protobuf:"bytes,7,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"`
	// CanonicalName for the workload. Used for telemetry.
	CanonicalName string `protobuf:"bytes,10,opt,name=canonical_name,json=canonicalName,proto3" json:"canonical_name,omitempty"`
	// CanonicalRevision for the workload. Used for telemetry.
	CanonicalRevision string `protobuf:"bytes,11,opt,name=canonical_revision,json=canonicalRevision,proto3" json:"canonical_revision,omitempty"`
	// WorkloadType represents the type of the workload. Used for telemetry.
	WorkloadType WorkloadType `` /* 132-byte string literal not displayed */
	// WorkloadName represents the name for the workload (of type WorkloadType). Used for telemetry.
	WorkloadName string `protobuf:"bytes,13,opt,name=workload_name,json=workloadName,proto3" json:"workload_name,omitempty"`
	ClusterId    string `protobuf:"bytes,18,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	// contains filtered or unexported fields
}

func (*Workload) Descriptor deprecated

func (*Workload) Descriptor() ([]byte, []int)

Deprecated: Use Workload.ProtoReflect.Descriptor instead.

func (*Workload) GetAddresses

func (x *Workload) GetAddresses() [][]byte

func (*Workload) GetCanonicalName

func (x *Workload) GetCanonicalName() string

func (*Workload) GetCanonicalRevision

func (x *Workload) GetCanonicalRevision() string

func (*Workload) GetClusterId

func (x *Workload) GetClusterId() string

func (*Workload) GetName

func (x *Workload) GetName() string

func (*Workload) GetNamespace

func (x *Workload) GetNamespace() string

func (*Workload) GetNetwork

func (x *Workload) GetNetwork() string

func (*Workload) GetServiceAccount

func (x *Workload) GetServiceAccount() string

func (*Workload) GetTrustDomain

func (x *Workload) GetTrustDomain() string

func (*Workload) GetUid

func (x *Workload) GetUid() string

func (*Workload) GetWorkloadName

func (x *Workload) GetWorkloadName() string

func (*Workload) GetWorkloadType

func (x *Workload) GetWorkloadType() WorkloadType

func (*Workload) ProtoMessage

func (*Workload) ProtoMessage()

func (*Workload) ProtoReflect

func (x *Workload) ProtoReflect() protoreflect.Message

func (*Workload) Reset

func (x *Workload) Reset()

func (*Workload) String

func (x *Workload) String() string

type WorkloadType

type WorkloadType int32
const (
	WorkloadType_DEPLOYMENT WorkloadType = 0
	WorkloadType_CRONJOB    WorkloadType = 1
	WorkloadType_POD        WorkloadType = 2
	WorkloadType_JOB        WorkloadType = 3
)

func (WorkloadType) Descriptor

func (WorkloadType) Enum

func (x WorkloadType) Enum() *WorkloadType

func (WorkloadType) EnumDescriptor deprecated

func (WorkloadType) EnumDescriptor() ([]byte, []int)

Deprecated: Use WorkloadType.Descriptor instead.

func (WorkloadType) Number

func (WorkloadType) String

func (x WorkloadType) String() string

func (WorkloadType) Type

Jump to

Keyboard shortcuts

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