Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discovery ¶
type Discovery interface {
DiscoveryClient() *discovery.DiscoveryClient
}
type ICache ¶
type ICache interface {
XGet(namespace string, resourceType ResourceType, name string) (*unstructured.Unstructured, error)
}
type IDataOperator ¶
type IDataOperator interface { ApplyGVR(namespace, name string, gvr *schema.GroupVersionResource, unstructured *unstructured.Unstructured) (newUnstructured *unstructured.Unstructured, isUpdate bool, err error) Apply(namespace string, resourceType ResourceType, name string, unstructured *unstructured.Unstructured, forceUpdate bool) (newUnstructured *unstructured.Unstructured, isUpdate bool, err error) Delete(namespace string, resourceType ResourceType, name string) error Patch(namespace string, resourceType ResourceType, name string, data []byte) (*unstructured.Unstructured, error) }
type IGVRMaps ¶
var GVRMaps IGVRMaps = &groupVersionCollection{ Water: {Group: "nuwa.nip.io", Version: "v1", Resource: "waters"}, Stone: {Group: "nuwa.nip.io", Version: "v1", Resource: "stones"}, StatefulSet1: {Group: "nuwa.nip.io", Version: "v1", Resource: "statefulsets"}, Injector: {Group: "nuwa.nip.io", Version: "v1", Resource: "injectors"}, Workloads: {Group: "yamecloud.io", Version: "v1", Resource: "workloads"}, BaseTenant: {Group: "yamecloud.io", Version: "v1", Resource: "basetenants"}, BaseDepartment: {Group: "yamecloud.io", Version: "v1", Resource: "basedepartments"}, BaseRole: {Group: "yamecloud.io", Version: "v1", Resource: "baseroles"}, BaseUser: {Group: "yamecloud.io", Version: "v1", Resource: "baseusers"}, BaseRoleUser: {Group: "yamecloud.io", Version: "v1", Resource: "baseroleusers"}, StatefulSet: {Group: "apps", Version: "v1", Resource: "statefulsets"}, DaemonSet: {Group: "apps", Version: "v1", Resource: "daemonsets"}, ReplicaSet: {Group: "apps", Version: "v1", Resource: "replicasets"}, Deployment: {Group: "apps", Version: "v1", Resource: "deployments"}, Job: {Group: "batch", Version: "v1", Resource: "jobs"}, CronJob: {Group: "batch", Version: "v1beta1", Resource: "cronjobs"}, Pod: {Group: "", Version: "v1", Resource: "pods"}, Node: {Group: "", Version: "v1", Resource: "nodes"}, Event: {Group: "", Version: "v1", Resource: "events"}, ConfigMap: {Group: "", Version: "v1", Resource: "configmaps"}, Secret: {Group: "", Version: "v1", Resource: "secrets"}, ResourceQuota: {Group: "", Version: "v1", Resource: "resourcequotas"}, Service: {Group: "", Version: "v1", Resource: "services"}, Namespace: {Group: "", Version: "v1", Resource: "namespaces"}, PersistentVolume: {Group: "", Version: "v1", Resource: "persistentvolumes"}, PersistentVolumeClaims: {Group: "", Version: "v1", Resource: "persistentvolumeclaims"}, ServiceAccount: {Group: "", Version: "v1", Resource: "serviceaccounts"}, Endpoint: {Group: "", Version: "v1", Resource: "endpoints"}, Ingress: {Group: "networking.k8s.io", Version: "v1", Resource: "ingresses"}, NetworkPolicy: {Group: "networking.k8s.io", Version: "v1", Resource: "networkpolicies"}, HorizontalPodAutoscaler: {Group: "autoscaling", Version: "v2beta1", Resource: "horizontalpodautoscalers"}, CustomResourceDefinition: {Group: "apiextensions.k8s.io", Version: "v1", Resource: "customresourcedefinitions"}, StorageClass: {Group: "storage.k8s.io", Version: "v1", Resource: "storageclasses"}, ClusterRole: {Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "clusterroles"}, Role: {Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "roles"}, ClusterRoleBinding: {Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "clusterrolebindings"}, RoleBinding: {Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "rolebindings"}, IP: {Group: "kubeovn.io", Version: "v1", Resource: "ips"}, SubNet: {Group: "kubeovn.io", Version: "v1", Resource: "subnets"}, Vlan: {Group: "kubeovn.io", Version: "v1", Resource: "vlans"}, NetworkAttachmentDefinition: {Group: "k8s.cni.cncf.io", Version: "v1", Resource: "network-attachment-definitions"}, Pipeline: {Group: "tekton.dev", Version: "v1alpha1", Resource: "pipelines"}, PipelineRun: {Group: "tekton.dev", Version: "v1alpha1", Resource: "pipelineruns"}, Task: {Group: "tekton.dev", Version: "v1alpha1", Resource: "tasks"}, TaskRun: {Group: "tekton.dev", Version: "v1alpha1", Resource: "taskruns"}, PipelineResource: {Group: "tekton.dev", Version: "v1alpha1", Resource: "pipelineresources"}, TektonGraph: {Group: "yamecloud.io", Version: "v1", Resource: "tektongraphs"}, TektonConfig: {Group: "", Version: "v1", Resource: "secrets"}, TektonWebHook: {Group: "yamecloud.io", Version: "v1", Resource: "tektonwebhooks"}, TektonStore: {Group: "yamecloud.io", Version: "v1", Resource: "tektonstores"}, PodSecurityPolicie: {Group: "policy", Version: "v1beta1", Resource: "podsecuritypolicies"}, Gateway: {Group: "networking.istio.io", Version: "v1beta1", Resource: "gateways"}, DestinationRule: {Group: "networking.istio.io", Version: "v1beta1", Resource: "destinationrules"}, ServiceEntry: {Group: "networking.istio.io", Version: "v1beta1", Resource: "serviceentries"}, Sidecar: {Group: "networking.istio.io", Version: "v1beta1", Resource: "sidecars"}, VirtualService: {Group: "networking.istio.io", Version: "v1beta1", Resource: "virtualservices"}, WorkloadEntry: {Group: "networking.istio.io", Version: "v1beta1", Resource: "workloadentries"}, GlobalConfig: {Group: "yamecloud.io", Version: "v1", Resource: "globalconfigs"}, }
describe resource collection
type ITypes ¶
type ITypes interface { ResourceRegister ResourceLister }
type Interface ¶
type Interface interface { Lister Watcher ICache IDataOperator RESTClient Discovery }
type Lister ¶
type Lister interface { List(namespace string, resourceType ResourceType, selector string) (*unstructured.UnstructuredList, error) Get(namespace string, resourceType ResourceType, name string, subresources ...string) (*unstructured.Unstructured, error) Cache() ICache ListGVR(namespace string, gvr schema.GroupVersionResource, selector string) (*unstructured.UnstructuredList, error) ListLimit(namespace string, resourceType ResourceType, flag string, pos, size int64, selector string) (*unstructured.UnstructuredList, error) }
type RESTClient ¶
type RESTClient interface { RESTClient() rest.Interface ClientSet() *kubernetes.Clientset }
type Resource ¶
type Resource struct { Name ResourceType Schema schema.GroupVersionResource }
type ResourceLister ¶
type ResourceLister interface { Ranges(d dynamicinformer.DynamicSharedInformerFactory, stop <-chan struct{}) GroupVersionResource(resourceType ResourceType) (schema.GroupVersionResource, error) }
type ResourceRegister ¶
type ResourceRegister interface {
Register(...Resource)
}
type ResourceType ¶
type ResourceType = string
const ( Water ResourceType = "waters" Deployment ResourceType = "deployments" Stone ResourceType = "stones" StatefulSet ResourceType = "statefulsets" StatefulSet1 ResourceType = "statefulset1s" DaemonSet ResourceType = "daemonsets" Injector ResourceType = "injectors" Pod ResourceType = "pods" Job ResourceType = "jobs" CronJob ResourceType = "cronjobs" ReplicaSet ResourceType = "replicasets" Event ResourceType = "events" Node ResourceType = "nodes" ConfigMap ResourceType = "configmaps" Secret ResourceType = "secrets" ResourceQuota ResourceType = "resourcequotas" Service ResourceType = "services" Ingress ResourceType = "ingresses" NetworkPolicy ResourceType = "networkpolicies" HorizontalPodAutoscaler ResourceType = "horizontalpodautoscalers" CustomResourceDefinition ResourceType = "customresourcedefinitions" PersistentVolume ResourceType = "persistentvolumes" PersistentVolumeClaims ResourceType = "persistentvolumeclaims" StorageClass ResourceType = "storageclasses" ServiceAccount ResourceType = "serviceaccounts" Role ResourceType = "roles" ClusterRole ResourceType = "clusterroles" RoleBinding ResourceType = "rolebindings" Namespace ResourceType = "namespaces" PodSecurityPolicie ResourceType = "podsecuritypolicies" ClusterRoleBinding ResourceType = "clusterrolebindings" Endpoint ResourceType = "endpoints" Metrics ResourceType = "metrics" // Workloads deployment resource workloads template for CaaS Workloads ResourceType = "workloads" // tenant for PaaS BaseDepartment ResourceType = "basedepartments" BaseTenant ResourceType = "basetenants" BaseRole ResourceType = "baseroles" BaseUser ResourceType = "baseusers" BaseRoleUser ResourceType = "baseroleusers" // network for container ovn/ovs control plant IP ResourceType = "ips" SubNet ResourceType = "subnets" Vlan ResourceType = "vlans" NetworkAttachmentDefinition ResourceType = "network-attachment-definitions" //tekton Pipeline ResourceType = "pipelines" PipelineRun ResourceType = "pipelineruns" Task ResourceType = "tasks" TaskRun ResourceType = "taskruns" PipelineResource ResourceType = "pipelineresources" TektonGraph ResourceType = "tektongraphs" TektonConfig ResourceType = "tektonconfigs" TektonWebHook ResourceType = "tektonwebhooks" TektonStore ResourceType = "tektonstores" //Istio NetWorking Gateway ResourceType = "gateways" DestinationRule ResourceType = "destinationrules" ServiceEntry ResourceType = "serviceentries" Sidecar ResourceType = "sidecars" VirtualService ResourceType = "virtualservices" WorkloadEntry ResourceType = "workloadentries" GlobalConfig ResourceType = "globalconfigs" )
Click to show internal directories.
Click to hide internal directories.