Documentation
¶
Index ¶
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type ProxyConfigMode
- type ProxyProfile
- func (pf *ProxyProfile) ConfigHash() string
- func (pf *ProxyProfile) ConstructLabelSelector() labels.Selector
- func (pf *ProxyProfile) ConstructLabels() map[string]string
- func (in *ProxyProfile) DeepCopy() *ProxyProfile
- func (in *ProxyProfile) DeepCopyInto(out *ProxyProfile)
- func (in *ProxyProfile) DeepCopyObject() runtime.Object
- func (pf *ProxyProfile) GenerateConfigMapName(namespace string) string
- func (pf *ProxyProfile) GetConfigMode() ProxyConfigMode
- func (pf *ProxyProfile) SpecHash() string
- type ProxyProfileList
- type ProxyProfileSpec
- type ProxyProfileStatus
- type ProxyRestartPolicy
- type ProxyRestartScope
- type Sidecar
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "flomesh.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type ProxyConfigMode ¶
type ProxyConfigMode string
const ( ProxyConfigModeRemote ProxyConfigMode = "Remote" ProxyConfigModeLocal ProxyConfigMode = "Local" )
type ProxyProfile ¶
type ProxyProfile struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ProxyProfileSpec `json:"spec,omitempty"`
Status ProxyProfileStatus `json:"status,omitempty"`
}
ProxyProfile is the Schema for the proxyprofiles API
func (*ProxyProfile) ConfigHash ¶
func (pf *ProxyProfile) ConfigHash() string
func (*ProxyProfile) ConstructLabelSelector ¶
func (pf *ProxyProfile) ConstructLabelSelector() labels.Selector
func (*ProxyProfile) ConstructLabels ¶
func (pf *ProxyProfile) ConstructLabels() map[string]string
func (*ProxyProfile) DeepCopy ¶
func (in *ProxyProfile) DeepCopy() *ProxyProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyProfile.
func (*ProxyProfile) DeepCopyInto ¶
func (in *ProxyProfile) DeepCopyInto(out *ProxyProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProxyProfile) DeepCopyObject ¶
func (in *ProxyProfile) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ProxyProfile) GenerateConfigMapName ¶
func (pf *ProxyProfile) GenerateConfigMapName(namespace string) string
func (*ProxyProfile) GetConfigMode ¶
func (pf *ProxyProfile) GetConfigMode() ProxyConfigMode
func (*ProxyProfile) SpecHash ¶
func (pf *ProxyProfile) SpecHash() string
type ProxyProfileList ¶
type ProxyProfileList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ProxyProfile `json:"items"`
}
ProxyProfileList contains a list of ProxyProfile
func (*ProxyProfileList) DeepCopy ¶
func (in *ProxyProfileList) DeepCopy() *ProxyProfileList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyProfileList.
func (*ProxyProfileList) DeepCopyInto ¶
func (in *ProxyProfileList) DeepCopyInto(out *ProxyProfileList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProxyProfileList) DeepCopyObject ¶
func (in *ProxyProfileList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProxyProfileSpec ¶
type ProxyProfileSpec struct {
// If this ProxyProfile is Disabled. A disabled ProxyProfile doesn't participate
// the sidecar injection process.
Disabled bool `json:"disabled,omitempty"`
// ConfigMode tells where the sidecar loads the scripts/config from, Local means from local files mounted by configmap,
// Remote means loads from remote pipy repo. Default value is Remote
ConfigMode ProxyConfigMode `json:"mode,omitempty"`
// Selector is a label query over pods that should be injected
// This's optional, please NOTE a nil or empty Selector match
// nothing not everything.
Selector *metav1.LabelSelector `json:"selector,omitempty"`
// Namespace ProxyProfile will only match the pods in the namespace
// otherwise, match pods in all namespaces(in cluster)
Namespace string `json:"namespace,omitempty"`
// Config contains the configuration data.
// Each key must consist of alphanumeric characters, '-', '_' or '.'.
// Values with non-UTF-8 byte sequences must use the BinaryData field.
// This option is mutually exclusive with RepoBaseUrl option, you can only
// have either one.
Config map[string]string `json:"config,omitempty"`
// List of environment variables to set in each of the service containers.
// Cannot be updated.
ServiceEnv []corev1.EnvVar `json:"serviceEnv,omitempty"`
// RestartPolicy indicates if ProxyProfile is updated, those already injected PODs
// should be updated or not. Default value is Never, it only has impact to new created
// PODs, existing PODs will not be updated.
RestartPolicy ProxyRestartPolicy `json:"restartPolicy,omitempty"`
// RestartScope takes effect when RestartPolicy is Always, it tells if we can restart
// the entire POD to apply the changes or only the sidecar containers inside the POD.
// Default value is Owner.
RestartScope ProxyRestartScope `json:"restartScope,omitempty"`
// List of sidecars, will be injected into POD. It must have at least ONE sidecar and
// up to 5 maximum.
Sidecars []Sidecar `json:"sidecars,omitempty"`
}
ProxyProfileSpec defines the desired state of ProxyProfile
func (*ProxyProfileSpec) DeepCopy ¶
func (in *ProxyProfileSpec) DeepCopy() *ProxyProfileSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyProfileSpec.
func (*ProxyProfileSpec) DeepCopyInto ¶
func (in *ProxyProfileSpec) DeepCopyInto(out *ProxyProfileSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProxyProfileStatus ¶
type ProxyProfileStatus struct {
// All associated config maps, key is namespace and value is the name of configmap
ConfigMaps map[string]string `json:"configMaps"`
}
ProxyProfileStatus defines the observed state of ProxyProfile
func (*ProxyProfileStatus) DeepCopy ¶
func (in *ProxyProfileStatus) DeepCopy() *ProxyProfileStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyProfileStatus.
func (*ProxyProfileStatus) DeepCopyInto ¶
func (in *ProxyProfileStatus) DeepCopyInto(out *ProxyProfileStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProxyRestartPolicy ¶
type ProxyRestartPolicy string
const ( ProxyRestartPolicyNever ProxyRestartPolicy = "Never" ProxyRestartPolicyAlways ProxyRestartPolicy = "Always" )
type ProxyRestartScope ¶
type ProxyRestartScope string
const ( //ProxyRestartScopePod ProxyRestartScope = "Pod" //ProxyRestartScopeSidecar ProxyRestartScope = "Sidecar" ProxyRestartScopeOwner ProxyRestartScope = "Owner" )
type Sidecar ¶
type Sidecar struct {
// Name of the container specified as a DNS_LABEL.
// Each container in a pod must have a unique name (DNS_LABEL).
// Cannot be updated.
Name string `json:"name"`
// The file name of entrypoint script for starting the PIPY instance.
// If not provided, the default value is the value of Name field with surfix .js.
// For example, if the Name of the sidecar is proxy, it looks up proxy.js in config folder.
// It only works in local config mode, if pulls scripts from remote repo, the repo server
// returns the name of startup script.
StartupScriptName string `json:"startupScriptName,omitempty"`
// Docker image name.
// This field is optional to allow higher level config management to default or override
// container images in workload controllers like Deployments and StatefulSets.
Image string `json:"image,omitempty"`
// Image pull policy.
// One of Always, Never, IfNotPresent.
// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
// Cannot be updated.
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
// List of environment variables to set in the sidecar container.
// Cannot be updated.
Env []corev1.EnvVar `json:"env,omitempty"`
// Entrypoint array. Not executed within a shell.
// The docker image's ENTRYPOINT is used if this is not provided.
// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
// regardless of whether the variable exists or not.
// Cannot be updated.
Command []string `json:"command,omitempty"`
// Arguments to the entrypoint.
// The docker image's CMD is used if this is not provided.
// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
// regardless of whether the variable exists or not.
// Cannot be updated.
Args []string `json:"args,omitempty"`
// Compute Resources required by this container.
// Cannot be updated.
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}
func (*Sidecar) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sidecar.
func (*Sidecar) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.