Documentation ¶
Index ¶
- Constants
- type ApiSpecs
- type ClientImpl
- func (s *ClientImpl) ApiSpecs() ApiSpecs
- func (s *ClientImpl) ApplyNamespace(ctx context.Context, name string, labels K8sLabels) (*corev1.Namespace, error)
- func (s *ClientImpl) ApplyResourceQuota(ctx context.Context, namespace string, name string, spec corev1.ResourceList) (*corev1.ResourceQuota, error)
- func (s *ClientImpl) DeleteConfigMap(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeleteConfigMaps(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) DeleteCronJob(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeleteCronJobs(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) DeleteDaemonSet(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeleteDaemonSets(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) DeleteDeployment(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeleteDeployments(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) DeleteJob(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeleteJobs(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) DeleteLimitRange(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeleteLimitRanges(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) DeleteNamespace(ctx context.Context, name string) error
- func (s *ClientImpl) DeletePersistentVolumeClaim(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeletePersistentVolumeClaims(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) DeletePod(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeletePodTemplate(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeletePodTemplates(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) DeletePods(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) DeleteReplicaSet(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeleteReplicaSets(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) DeleteReplicationController(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeleteReplicationControllers(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) DeleteResourceQuota(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeleteResourceQuotas(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) DeleteSecret(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeleteSecrets(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) DeleteService(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeleteServiceAccount(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeleteServiceAccounts(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) DeleteStatefulSet(ctx context.Context, namespace string, name string) error
- func (s *ClientImpl) DeleteStatefulSets(ctx context.Context, namespace string, selector string) error
- func (s *ClientImpl) GetConfigMap(ctx context.Context, namespace string, name string) (*corev1.ConfigMap, error)
- func (s *ClientImpl) GetCronJob(ctx context.Context, namespace string, name string) (*batchv1.CronJob, error)
- func (s *ClientImpl) GetDaemonSet(ctx context.Context, namespace string, name string) (*appsv1.DaemonSet, error)
- func (s *ClientImpl) GetDeployment(ctx context.Context, namespace string, name string) (*appsv1.Deployment, error)
- func (s *ClientImpl) GetEndpoints(ctx context.Context, namspace string, name string) (*corev1.Endpoints, error)
- func (s *ClientImpl) GetEvent(ctx context.Context, namspace string, name string) (*eventv1.Event, error)
- func (s *ClientImpl) GetJob(ctx context.Context, namespace string, name string) (*batchv1.Job, error)
- func (s *ClientImpl) GetLimitRange(ctx context.Context, namspace string, name string) (*corev1.LimitRange, error)
- func (s *ClientImpl) GetNamespace(ctx context.Context, name string) (*corev1.Namespace, error)
- func (s *ClientImpl) GetNode(ctx context.Context, name string) (*corev1.Node, error)
- func (s *ClientImpl) GetPersistentVolume(ctx context.Context, name string) (*corev1.PersistentVolume, error)
- func (s *ClientImpl) GetPersistentVolumeClaim(ctx context.Context, namspace string, name string) (*corev1.PersistentVolumeClaim, error)
- func (s *ClientImpl) GetPod(ctx context.Context, namespace string, name string) (*corev1.Pod, error)
- func (s *ClientImpl) GetPodTemplate(ctx context.Context, namespace string, name string) (*corev1.PodTemplate, error)
- func (s *ClientImpl) GetReplicaSet(ctx context.Context, namespace string, name string) (*appsv1.ReplicaSet, error)
- func (s *ClientImpl) GetReplicationController(ctx context.Context, namespace string, name string) (*corev1.ReplicationController, error)
- func (s *ClientImpl) GetResourceQuota(ctx context.Context, namespace string, name string) (*corev1.ResourceQuota, error)
- func (s *ClientImpl) GetSecret(ctx context.Context, namespace string, name string) (*corev1.Secret, error)
- func (s *ClientImpl) GetService(ctx context.Context, namespace string, name string) (*corev1.Service, error)
- func (s *ClientImpl) GetServiceAccount(ctx context.Context, namespace string, name string) (*corev1.ServiceAccount, error)
- func (s *ClientImpl) GetStatefulSet(ctx context.Context, namespace string, name string) (*appsv1.StatefulSet, error)
- func (s *ClientImpl) GetStorageClass(ctx context.Context, namespace string, name string) (*storagev1.StorageClass, error)
- func (s *ClientImpl) ListConfigMap(ctx context.Context, namespace string, selector string) (*corev1.ConfigMapList, error)
- func (s *ClientImpl) ListCronJob(ctx context.Context, namespace string, selector string) (*batchv1.CronJobList, error)
- func (s *ClientImpl) ListDaemonSet(ctx context.Context, namespace string, selector string) (*appsv1.DaemonSetList, error)
- func (s *ClientImpl) ListDeployment(ctx context.Context, namespace string, selector string) (*appsv1.DeploymentList, error)
- func (s *ClientImpl) ListEndpoints(ctx context.Context, namespace string, selector string) (*corev1.EndpointsList, error)
- func (s *ClientImpl) ListEvent(ctx context.Context, namespace string, selector string) (*eventv1.EventList, error)
- func (s *ClientImpl) ListJob(ctx context.Context, namespace string, selector string) (*batchv1.JobList, error)
- func (s *ClientImpl) ListLimitRange(ctx context.Context, namespace string, selector string) (*corev1.LimitRangeList, error)
- func (s *ClientImpl) ListNamespace(ctx context.Context, selector string) (*corev1.NamespaceList, error)
- func (s *ClientImpl) ListNode(ctx context.Context, selector string) (*corev1.NodeList, error)
- func (s *ClientImpl) ListPersistentVolume(ctx context.Context, selector string) (*corev1.PersistentVolumeList, error)
- func (s *ClientImpl) ListPersistentVolumeClaim(ctx context.Context, namespace string, selector string) (*corev1.PersistentVolumeClaimList, error)
- func (s *ClientImpl) ListPod(ctx context.Context, namespace string, selector string) (*corev1.PodList, error)
- func (s *ClientImpl) ListPodTemplate(ctx context.Context, namespace string, selector string) (*corev1.PodTemplateList, error)
- func (s *ClientImpl) ListReplicaSet(ctx context.Context, namespace string, selector string) (*appsv1.ReplicaSetList, error)
- func (s *ClientImpl) ListReplicationController(ctx context.Context, namespace string, selector string) (*corev1.ReplicationControllerList, error)
- func (s *ClientImpl) ListResourceQuota(ctx context.Context, namespace string, selector string) (*corev1.ResourceQuotaList, error)
- func (s *ClientImpl) ListSecret(ctx context.Context, namespace string, selector string) (*corev1.SecretList, error)
- func (s *ClientImpl) ListService(ctx context.Context, namespace string, selector string) (*corev1.ServiceList, error)
- func (s *ClientImpl) ListServiceAccount(ctx context.Context, namespace string, selector string) (*corev1.ServiceAccountList, error)
- func (s *ClientImpl) ListStatefulSet(ctx context.Context, namespace string, selector string) (*appsv1.StatefulSetList, error)
- func (s *ClientImpl) ObjectToJob(object runtime.Object) *batchv1.Job
- func (s *ClientImpl) ObjectToNamespace(object runtime.Object) *corev1.Namespace
- func (s *ClientImpl) ObjectToPod(object runtime.Object) *corev1.Pod
- func (s *ClientImpl) ObjectToResourceQuota(object runtime.Object) *corev1.ResourceQuota
- func (s *ClientImpl) RestartDaemonSet(ctx context.Context, namespace string, name string) (*appsv1.DaemonSet, error)
- func (s *ClientImpl) RestartDeployment(ctx context.Context, namespace string, name string) (*appsv1.Deployment, error)
- func (s *ClientImpl) RestartStatefulSet(ctx context.Context, namespace string, name string) (*appsv1.StatefulSet, error)
- func (s *ClientImpl) WatchJobs(ctx context.Context, namespace string, selector string) (watch.Interface, error)
- func (s *ClientImpl) WatchNamespaces(ctx context.Context, selector string) (watch.Interface, error)
- func (s *ClientImpl) WatchPods(ctx context.Context, namespace string, selector string) (watch.Interface, error)
- func (s ClientImpl) WatchResourceQuotas(ctx context.Context, namespace string, selector string) (watch.Interface, error)
- type DynamicImpl
- type K8sClusterConfig
- type K8sLabels
- type LabelName
- type MetricsImpl
- func (s *MetricsImpl) GetNode(ctx context.Context, name string) (*metricsV1beta1api.NodeMetrics, error)
- func (s *MetricsImpl) GetPod(ctx context.Context, namespace string, name string) (*metricsV1beta1api.PodMetrics, error)
- func (s *MetricsImpl) ListNode(ctx context.Context, selector string) (*metricsV1beta1api.NodeMetricsList, error)
- func (s *MetricsImpl) ListPod(ctx context.Context, namespace string, selector string) (*metricsV1beta1api.PodMetricsList, error)
- type ResourceSpecs
Constants ¶
View Source
const ( LABEL_ENVIRONMENT = "environment" LABEL_COMPONENT = "component" LABEL_APP_IDPP2 = "app.idpp2" LABEL_PART_OF = "part-of" LABEL_IDPP2_BUILDER = "aiblab.co.kr/builder" LABEL_IDPP2_BUILDER_TAGET = "aiblab.co.kr/builder-target" LABEL_IDPP2_USERNAME = "aiblab.co.kr/username" LABEL_JUPYTERUSERNAME = "hub.jupyter.org/username" LABEL_NVIDIA_GPU = "nvidia.com/gpu" )
View Source
const ( FIELD_MANAGER = "projectmanager" AIBLAB_ENVIRONMENT = "idpp2" AIBLAB_BUILDER = "idpp2-builder" AIBLAB_BUILDER_TAGET_IPYKERNEL = "ipykernel" AIBLAB_BUILDER_TAGET_IRKERNEL = "irkernel" AIBLAB_BUILDER_TAGET_TFSERVING = "tfserving" )
View Source
const ( TYPEMETA_KIND_NAMESPACE = "Namespace" TYPEMETA_KIND_RESOURCEQUOTA = "ResourceQuota" TYPEMETA_KIND_POD = "Pod" TYPEMETA_KIND_SERVICE = "Service" TYPEMETA_KIND_DEPLOYMENT = "Deployment" TYPEMETA_KIND_JOB = "Job" )
View Source
const ( TYPEMETA_APIVERSION_V1 = "v1" TYPEMETA_APIVERSION_BATCH_V1 = "batch/v1" TYPEMETA_APIVERSION_METRICS_V1BETA1 = "metrics.k8s.io/v1beta1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiSpecs ¶
type ApiSpecs map[string]metav1.APIResource
func (ApiSpecs) GetResource ¶
func (s ApiSpecs) GetResource(kind string) metav1.APIResource
type ClientImpl ¶
type ClientImpl struct {
// contains filtered or unexported fields
}
func NewK8sClient ¶
func NewK8sClient(config *K8sClusterConfig) *ClientImpl
func (*ClientImpl) ApiSpecs ¶
func (s *ClientImpl) ApiSpecs() ApiSpecs
func (*ClientImpl) ApplyNamespace ¶
func (*ClientImpl) ApplyResourceQuota ¶ added in v0.0.3
func (s *ClientImpl) ApplyResourceQuota(ctx context.Context, namespace string, name string, spec corev1.ResourceList) (*corev1.ResourceQuota, error)
func (*ClientImpl) DeleteConfigMap ¶
func (*ClientImpl) DeleteConfigMaps ¶
func (*ClientImpl) DeleteCronJob ¶
func (*ClientImpl) DeleteCronJobs ¶
func (*ClientImpl) DeleteDaemonSet ¶
func (*ClientImpl) DeleteDaemonSets ¶
func (*ClientImpl) DeleteDeployment ¶
func (*ClientImpl) DeleteDeployments ¶
func (*ClientImpl) DeleteJobs ¶
func (*ClientImpl) DeleteLimitRange ¶
func (*ClientImpl) DeleteLimitRanges ¶
func (*ClientImpl) DeleteNamespace ¶
func (s *ClientImpl) DeleteNamespace(ctx context.Context, name string) error
func (*ClientImpl) DeletePersistentVolumeClaim ¶
func (*ClientImpl) DeletePersistentVolumeClaims ¶
func (*ClientImpl) DeletePodTemplate ¶
func (*ClientImpl) DeletePodTemplates ¶
func (*ClientImpl) DeletePods ¶
func (*ClientImpl) DeleteReplicaSet ¶
func (*ClientImpl) DeleteReplicaSets ¶
func (*ClientImpl) DeleteReplicationController ¶
func (*ClientImpl) DeleteReplicationControllers ¶
func (*ClientImpl) DeleteResourceQuota ¶
func (*ClientImpl) DeleteResourceQuotas ¶
func (*ClientImpl) DeleteSecret ¶
func (*ClientImpl) DeleteSecrets ¶
func (*ClientImpl) DeleteService ¶
func (*ClientImpl) DeleteServiceAccount ¶
func (*ClientImpl) DeleteServiceAccounts ¶
func (*ClientImpl) DeleteStatefulSet ¶
func (*ClientImpl) DeleteStatefulSets ¶
func (*ClientImpl) GetConfigMap ¶
func (*ClientImpl) GetCronJob ¶
func (*ClientImpl) GetDaemonSet ¶
func (*ClientImpl) GetDeployment ¶
func (s *ClientImpl) GetDeployment(ctx context.Context, namespace string, name string) (*appsv1.Deployment, error)
func (*ClientImpl) GetEndpoints ¶
func (*ClientImpl) GetLimitRange ¶
func (s *ClientImpl) GetLimitRange(ctx context.Context, namspace string, name string) (*corev1.LimitRange, error)
func (*ClientImpl) GetNamespace ¶
func (*ClientImpl) GetPersistentVolume ¶
func (s *ClientImpl) GetPersistentVolume(ctx context.Context, name string) (*corev1.PersistentVolume, error)
func (*ClientImpl) GetPersistentVolumeClaim ¶
func (s *ClientImpl) GetPersistentVolumeClaim(ctx context.Context, namspace string, name string) (*corev1.PersistentVolumeClaim, error)
func (*ClientImpl) GetPodTemplate ¶
func (s *ClientImpl) GetPodTemplate(ctx context.Context, namespace string, name string) (*corev1.PodTemplate, error)
func (*ClientImpl) GetReplicaSet ¶
func (s *ClientImpl) GetReplicaSet(ctx context.Context, namespace string, name string) (*appsv1.ReplicaSet, error)
func (*ClientImpl) GetReplicationController ¶
func (s *ClientImpl) GetReplicationController(ctx context.Context, namespace string, name string) (*corev1.ReplicationController, error)
func (*ClientImpl) GetResourceQuota ¶
func (s *ClientImpl) GetResourceQuota(ctx context.Context, namespace string, name string) (*corev1.ResourceQuota, error)
func (*ClientImpl) GetService ¶
func (*ClientImpl) GetServiceAccount ¶
func (s *ClientImpl) GetServiceAccount(ctx context.Context, namespace string, name string) (*corev1.ServiceAccount, error)
func (*ClientImpl) GetStatefulSet ¶
func (s *ClientImpl) GetStatefulSet(ctx context.Context, namespace string, name string) (*appsv1.StatefulSet, error)
func (*ClientImpl) GetStorageClass ¶
func (s *ClientImpl) GetStorageClass(ctx context.Context, namespace string, name string) (*storagev1.StorageClass, error)
func (*ClientImpl) ListConfigMap ¶
func (s *ClientImpl) ListConfigMap(ctx context.Context, namespace string, selector string) (*corev1.ConfigMapList, error)
func (*ClientImpl) ListCronJob ¶
func (s *ClientImpl) ListCronJob(ctx context.Context, namespace string, selector string) (*batchv1.CronJobList, error)
func (*ClientImpl) ListDaemonSet ¶
func (s *ClientImpl) ListDaemonSet(ctx context.Context, namespace string, selector string) (*appsv1.DaemonSetList, error)
func (*ClientImpl) ListDeployment ¶
func (s *ClientImpl) ListDeployment(ctx context.Context, namespace string, selector string) (*appsv1.DeploymentList, error)
func (*ClientImpl) ListEndpoints ¶
func (s *ClientImpl) ListEndpoints(ctx context.Context, namespace string, selector string) (*corev1.EndpointsList, error)
func (*ClientImpl) ListLimitRange ¶
func (s *ClientImpl) ListLimitRange(ctx context.Context, namespace string, selector string) (*corev1.LimitRangeList, error)
func (*ClientImpl) ListNamespace ¶
func (s *ClientImpl) ListNamespace(ctx context.Context, selector string) (*corev1.NamespaceList, error)
func (*ClientImpl) ListPersistentVolume ¶
func (s *ClientImpl) ListPersistentVolume(ctx context.Context, selector string) (*corev1.PersistentVolumeList, error)
func (*ClientImpl) ListPersistentVolumeClaim ¶
func (s *ClientImpl) ListPersistentVolumeClaim(ctx context.Context, namespace string, selector string) (*corev1.PersistentVolumeClaimList, error)
func (*ClientImpl) ListPodTemplate ¶
func (s *ClientImpl) ListPodTemplate(ctx context.Context, namespace string, selector string) (*corev1.PodTemplateList, error)
func (*ClientImpl) ListReplicaSet ¶
func (s *ClientImpl) ListReplicaSet(ctx context.Context, namespace string, selector string) (*appsv1.ReplicaSetList, error)
func (*ClientImpl) ListReplicationController ¶
func (s *ClientImpl) ListReplicationController(ctx context.Context, namespace string, selector string) (*corev1.ReplicationControllerList, error)
func (*ClientImpl) ListResourceQuota ¶
func (s *ClientImpl) ListResourceQuota(ctx context.Context, namespace string, selector string) (*corev1.ResourceQuotaList, error)
func (*ClientImpl) ListSecret ¶
func (s *ClientImpl) ListSecret(ctx context.Context, namespace string, selector string) (*corev1.SecretList, error)
func (*ClientImpl) ListService ¶
func (s *ClientImpl) ListService(ctx context.Context, namespace string, selector string) (*corev1.ServiceList, error)
func (*ClientImpl) ListServiceAccount ¶
func (s *ClientImpl) ListServiceAccount(ctx context.Context, namespace string, selector string) (*corev1.ServiceAccountList, error)
func (*ClientImpl) ListStatefulSet ¶
func (s *ClientImpl) ListStatefulSet(ctx context.Context, namespace string, selector string) (*appsv1.StatefulSetList, error)
func (*ClientImpl) ObjectToJob ¶
func (s *ClientImpl) ObjectToJob(object runtime.Object) *batchv1.Job
func (*ClientImpl) ObjectToNamespace ¶
func (s *ClientImpl) ObjectToNamespace(object runtime.Object) *corev1.Namespace
func (*ClientImpl) ObjectToPod ¶
func (s *ClientImpl) ObjectToPod(object runtime.Object) *corev1.Pod
func (*ClientImpl) ObjectToResourceQuota ¶
func (s *ClientImpl) ObjectToResourceQuota(object runtime.Object) *corev1.ResourceQuota
func (*ClientImpl) RestartDaemonSet ¶
func (*ClientImpl) RestartDeployment ¶
func (s *ClientImpl) RestartDeployment(ctx context.Context, namespace string, name string) (*appsv1.Deployment, error)
func (*ClientImpl) RestartStatefulSet ¶
func (s *ClientImpl) RestartStatefulSet(ctx context.Context, namespace string, name string) (*appsv1.StatefulSet, error)
func (*ClientImpl) WatchNamespaces ¶
func (ClientImpl) WatchResourceQuotas ¶
type DynamicImpl ¶
type DynamicImpl struct {
// contains filtered or unexported fields
}
func NewK8sDynamicClient ¶
func NewK8sDynamicClient(config *K8sClusterConfig) *DynamicImpl
func (*DynamicImpl) Apply ¶
func (s *DynamicImpl) Apply(ctx context.Context, namespace string, gvr schema.GroupVersionResource, resource ResourceSpecs) (*unstructured.Unstructured, error)
type K8sClusterConfig ¶
type K8sClusterConfig struct {
// contains filtered or unexported fields
}
func NewClusterConfig ¶
func NewClusterConfig() *K8sClusterConfig
type MetricsImpl ¶ added in v0.0.3
type MetricsImpl struct {
// contains filtered or unexported fields
}
func NewK8sMetricClient ¶
func NewK8sMetricClient(config *K8sClusterConfig) *MetricsImpl
func (*MetricsImpl) GetNode ¶ added in v0.0.3
func (s *MetricsImpl) GetNode(ctx context.Context, name string) (*metricsV1beta1api.NodeMetrics, error)
func (*MetricsImpl) GetPod ¶ added in v0.0.3
func (s *MetricsImpl) GetPod(ctx context.Context, namespace string, name string) (*metricsV1beta1api.PodMetrics, error)
func (*MetricsImpl) ListNode ¶ added in v0.0.3
func (s *MetricsImpl) ListNode(ctx context.Context, selector string) (*metricsV1beta1api.NodeMetricsList, error)
func (*MetricsImpl) ListPod ¶ added in v0.0.3
func (s *MetricsImpl) ListPod(ctx context.Context, namespace string, selector string) (*metricsV1beta1api.PodMetricsList, error)
type ResourceSpecs ¶
type ResourceSpecs map[string]interface{}
func (ResourceSpecs) GetApiVersion ¶
func (s ResourceSpecs) GetApiVersion() string
func (ResourceSpecs) GetKind ¶
func (s ResourceSpecs) GetKind() string
func (ResourceSpecs) GetName ¶
func (s ResourceSpecs) GetName() string
func (ResourceSpecs) GroupVersionResource ¶
func (s ResourceSpecs) GroupVersionResource(client *ClientImpl) schema.GroupVersionResource
Click to show internal directories.
Click to hide internal directories.