manageCluster

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateorUpdateDefaultQuota

func CreateorUpdateDefaultQuota(config string, namespaceyaml string, connection *kubernetes.Clientset, key string)

func CreateorUpdateNameSpace

func CreateorUpdateNameSpace(namespaceyaml string, connection *kubernetes.Clientset, key string) error

func CreateorUpdateNameSpaceUser

func CreateorUpdateNameSpaceUser(config string, namespaceyaml string, connection *kubernetes.Clientset, key string) error

func CreateorUpdateResourceQuota

func CreateorUpdateResourceQuota(resourcequotayaml string, namespaceyaml string, connection *kubernetes.Clientset, key string) error

func CreateorUpdateStorageClass

func CreateorUpdateStorageClass(config string, connection *kubernetes.Clientset, key string) error

func Init

func Init(clustername string, masterurl string, kubeconfig string) (err error)

func SetupConnection

func SetupConnection(url string, kubeconfig string) (*kubernetes.Clientset, error)

func V1ResourceByStorageClass

func V1ResourceByStorageClass(storageClass string, resourceName v1.ResourceName) v1.ResourceName

Types

type DefaultQuotaVals

type DefaultQuotaVals struct {
	DefaultQuota struct {
		Details []struct {
			Name                 v1.LimitType                          `yaml:"Name"`
			Max                  map[v1.ResourceName]resource.Quantity `yaml:"max"`
			Min                  map[v1.ResourceName]resource.Quantity `yaml:"min"`
			Default              map[v1.ResourceName]resource.Quantity `yaml:"default,omitempty"`
			DefaultRequest       map[v1.ResourceName]resource.Quantity `yaml:"defaultRequest,omitempty"`
			MaxLimitRequestRatio map[v1.ResourceName]resource.Quantity `yaml:"Details"`
		} `yaml:"Details"`
		Labels map[string]string `yaml:"Labels"`
	} `yaml:"DefaultQuota"`
}

type NameSpaceRoleVals

type NameSpaceRoleVals struct {
	NameSpaceRoleDetails struct {
		AppendName  string            `yaml:"AppendName"`
		Labels      map[string]string `yaml:"Labels"`
		PolicyRules []struct {
			APIGroups []string `yaml:"APIGroups"`
			Resources []string `yaml:"Resources"`
			Verbs     []string `yaml:"Verbs"`
		} `yaml:"PolicyRules"`
	} `yaml:"NameSpaceRoleDetails"`
}

type NameSpaceVals

type NameSpaceVals struct {
	Delete struct {
		Enable bool `yaml:"Enable"`
	}
	NameSpace []struct {
		Name          string            `yaml:"Name"`
		ResourceQuota string            `yaml:"ResourceQuota"`
		DefaultQuota  string            `yaml:"DefaultQuota"`
		Labels        map[string]string `yaml:"Labels"`
	} `yaml:"NameSpace"`
}

type ResourceQuotaVals

type ResourceQuotaVals struct {
	ResourceQuota []struct {
		ResourceQuotaName        string `yaml:"QuotaName"`
		RequestsCPU              string `yaml:"RequestsCPU"`
		LimitsCPU                string `yaml:"LimitsCPU"`
		RequestsMemory           string `yaml:"RequestsMemory"`
		LimitsMemory             string `yaml:"LimitsMemory"`
		Pods                     string `yaml:"Pods"`
		RequestsStorage          string `yaml:"Name"`
		RequestsEphemeralStorage string `yaml:"RequestsStorage"`
		LimitsEphemeralStorage   string `yaml:"LimitsEphemeralStorage"`
		StorageClasses           []struct {
			Name            string `yaml:"Name"`
			RequestsStorage string `yaml:"RequestsStorage"`
		} `yaml:"StorageClasses"`
		Labels map[string]string `yaml:"Labels"`
	} `yaml:"ResourceQuota"`
}

type StorageClassVals

type StorageClassVals struct {
	Delete struct {
		Enable bool `yaml:"Enable"`
	} `yaml:"Delete"`
	StorageClasses []struct {
		Name              string            `yaml:"Name"`
		Provisioner       string            `yaml:"Provisioner"`
		Parameters        map[string]string `yaml:"Parameters"`
		ReclaimPolicy     string            `yaml:"ReclaimPolicy"`
		VolumeBindingMode string            `yaml:"VolumeBindingMode"`
		Labels            map[string]string `yaml:"Labels"`
	} `yaml:"StorageClasses"`
}

Jump to

Keyboard shortcuts

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