kubernetes

package
v1.1.41 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 56 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RES_NAMESPACE                   string = "namespace"
	RES_POD                         string = "pod"
	RES_DEPLOYMENT                  string = "deployment"
	RES_SERVICE                     string = "service"
	RES_INGRESS                     string = "ingress"
	RES_CONFIGMAP                   string = "configmap"
	RES_SECRET                      string = "secret"
	RES_NODE                        string = "node"
	RES_DAEMON_SET                  string = "daemon_set"
	RES_STATEFUL_SET                string = "stateful_set"
	RES_JOB                         string = "job"
	RES_CRON_JOB                    string = "cron_job"
	RES_REPLICA_SET                 string = "replica_set"
	RES_PERSISTENT_VOLUME           string = "persistent_volume"
	RES_PERSISTENT_VOLUME_CLAIM     string = "persistent_volume_claim"
	RES_HORIZONTAL_POD_AUTOSCALER   string = "horizontal_pod_autoscaler"
	RES_EVENT                       string = "event"
	RES_CERTIFICATE                 string = "certificate"
	RES_CERTIFICATE_REQUEST         string = "certificaterequest"
	RES_ORDER                       string = "orders"
	RES_ISSUER                      string = "issuer"
	RES_CLUSTER_ISSUER              string = "clusterissuer"
	RES_SERVICE_ACCOUNT             string = "service_account"
	RES_ROLE                        string = "role"
	RES_ROLE_BINDING                string = "role_binding"
	RES_CLUSTER_ROLE                string = "cluster_role"
	RES_CLUSTER_ROLE_BINDING        string = "cluster_role_binding"
	RES_VOLUME_ATTACHMENT           string = "volume_attachment"
	RES_NETWORK_POLICY              string = "network_policy"
	RES_STORAGECLASS                string = "storageclass"
	RES_CUSTOM_RESOURCE_DEFINITIONS string = "crds"
	RES_ENDPOINTS                   string = "endpoints"
	RES_LEASES                      string = "leases"
	RES_PRIORITYCLASSES             string = "priorityclasses"
	RES_VOLUMESNAPSHOTS             string = "volumesnapshots"
	RES_RESOURCEQUOTAS              string = "resourcequotas"
)
View Source
const (
	INGRESS_PREFIX = "ingress"
)

Variables

View Source
var (
	DEPLOYMENTIMAGE = fmt.Sprintf("ghcr.io/mogenius/%s:v%s", version.Name, version.Ver)

	SERVICEACCOUNTNAME     = fmt.Sprintf("%s-service-account-app", version.Name)
	CLUSTERROLENAME        = fmt.Sprintf("%s--cluster-role-app", version.Name)
	CLUSTERROLEBINDINGNAME = fmt.Sprintf("%s--cluster-role-binding-app", version.Name)
	RBACRESOURCES          = []string{"pods", "services", "endpoints", "secrets"}
	SERVICENAME            = fmt.Sprintf("%s-service", version.Name)
	INGRESSNAME            = fmt.Sprintf("%s-ingress", version.Name)
)

Functions

func AllCertificates

func AllCertificates(namespaceName string) []cmapi.Certificate

func AllConfigmaps

func AllConfigmaps(namespaceName string) []v1.ConfigMap

func AllDaemonsets

func AllDaemonsets(namespaceName string) []v1.DaemonSet

func AllDeployments

func AllDeployments(namespaceName string) []v1.Deployment

func AllIngresses

func AllIngresses(namespaceName string) []v1.Ingress

func AllPersistentVolumeClaims

func AllPersistentVolumeClaims(namespaceName string) []core.PersistentVolumeClaim

func AllPodNames

func AllPodNames() []string

func AllPodNamesForLabel

func AllPodNamesForLabel(namespace string, labelKey string, labelValue string) []string

func AllPods

func AllPods(namespaceName string) []v1.Pod

func AllReplicasets

func AllReplicasets(namespaceName string) []v1.ReplicaSet

func AllSecrets

func AllSecrets(namespaceName string) []v1.Secret

func AllServices

func AllServices(namespaceName string) []v1.Service

func ClusterStatus

func ClusterStatus() dtos.ClusterStatusDto

func ConfigMapFor

func ConfigMapFor(namespace string, configMapName string) *v1.ConfigMap

func CreateClusterSecretIfNotExist

func CreateClusterSecretIfNotExist(kubeProvider *KubeProvider) (utils.ClusterSecret, error)

func CreateContextSecretIfNotExist

func CreateContextSecretIfNotExist(kubeProvider *KubeProvider) (*dtos.PunqContext, error)

func CreateUserSecretIfNotExist

func CreateUserSecretIfNotExist(kubeProvider *KubeProvider) (*dtos.PunqUser, error)

func CurrentContextName

func CurrentContextName() string

func Deploy

func Deploy(clusterName string, ingressHostname string)

func GetCertificate

func GetCertificate(namespaceName string, resourceName string) (*cmapi.Certificate, error)

func GetClusterExternalIps

func GetClusterExternalIps() []string

func GetFirstPodForLabelName

func GetFirstPodForLabelName(namespace string, labelName string) *v1.Pod

labelname should look like app=my-app-name (like you defined your label)

func GetIngressControllerIps

func GetIngressControllerIps(useLocalKubeConfig bool) []net.IP

func GetNodeStats

func GetNodeStats() []dtos.NodeStat

func GetPod

func GetPod(namespace string, podName string) *v1.Pod

func Hostname

func Hostname() string

func HumanDuration

func HumanDuration(d time.Duration) string

TAKEN FROM Kubernetes apimachineryv0.25.1

func LastTerminatedStateIfAny

func LastTerminatedStateIfAny(pod *v1.Pod) *v1.ContainerStateTerminated

func LastTerminatedStateToString

func LastTerminatedStateToString(terminatedState *v1.ContainerStateTerminated) string

func ListAllNamespace

func ListAllNamespace() []v1.Namespace

func ListAllNamespaceNames

func ListAllNamespaceNames() []string

func ListNodes

func ListNodes() []v1.Node

func ListPodsTerminal

func ListPodsTerminal(namespace string)

func ListTemplatesTerminal

func ListTemplatesTerminal()

func ListWorkloads

func ListWorkloads()

func MoCreateOptions

func MoCreateOptions() metav1.CreateOptions

func MoUpdateOptions

func MoUpdateOptions() metav1.UpdateOptions

func NamespaceExists

func NamespaceExists(namespaceName string) (bool, error)

func PodIdsFor

func PodIdsFor(namespace string, serviceId *string) []string

func PodStatus

func PodStatus(namespace string, name string, statusOnly bool) *v1.Pod

func Remove

func Remove(clusterName string)

func SecretFor

func SecretFor(namespace string, name string) *v1.Secret

func ServiceFor

func ServiceFor(namespace string, serviceName string) *v1.Service

func ServicePodStatus

func ServicePodStatus(namespace string, serviceName string) []v1.Pod

func StartPortForward

func StartPortForward(localPort int, podPort int)

func StreamLog

func StreamLog(namespace string, podId string, sinceSeconds int64) (*rest.Request, error)

func StreamPreviousLog

func StreamPreviousLog(namespace string, podId string) (*rest.Request, error)

func UpdateServiceWith

func UpdateServiceWith(service *v1.Service) error

Types

type K8sNewWorkload

type K8sNewWorkload struct {
	Name        string `json:"name"`
	YamlString  string `json:"yamlString"`
	Description string `json:"description"`
}

func ListCreateTemplates

func ListCreateTemplates() []K8sNewWorkload

func NewK8sCertificate

func NewK8sCertificate() K8sNewWorkload

func NewK8sCertificateSigningRequest

func NewK8sCertificateSigningRequest() K8sNewWorkload

func NewK8sClusterIssuer

func NewK8sClusterIssuer() K8sNewWorkload

func NewK8sClusterRole

func NewK8sClusterRole() K8sNewWorkload

func NewK8sClusterRoleBinding

func NewK8sClusterRoleBinding() K8sNewWorkload

func NewK8sConfigmap

func NewK8sConfigmap() K8sNewWorkload

func NewK8sCronJob

func NewK8sCronJob() K8sNewWorkload

func NewK8sCustomResourceDefinition

func NewK8sCustomResourceDefinition() K8sNewWorkload

func NewK8sDaemonSet

func NewK8sDaemonSet() K8sNewWorkload

func NewK8sDeployment

func NewK8sDeployment() K8sNewWorkload

func NewK8sEndpoint

func NewK8sEndpoint() K8sNewWorkload

func NewK8sHpa

func NewK8sHpa() K8sNewWorkload

func NewK8sIngress

func NewK8sIngress() K8sNewWorkload

func NewK8sIssuer

func NewK8sIssuer() K8sNewWorkload

func NewK8sJob

func NewK8sJob() K8sNewWorkload

func NewK8sLease

func NewK8sLease() K8sNewWorkload

func NewK8sNamespace

func NewK8sNamespace() K8sNewWorkload

func NewK8sNetPol

func NewK8sNetPol() K8sNewWorkload

func NewK8sOrder

func NewK8sOrder() K8sNewWorkload

func NewK8sPersistentVolumeClaim

func NewK8sPersistentVolumeClaim() K8sNewWorkload

func NewK8sPod

func NewK8sPod() K8sNewWorkload

func NewK8sPriorityClass

func NewK8sPriorityClass() K8sNewWorkload

func NewK8sReplicaSet

func NewK8sReplicaSet() K8sNewWorkload

func NewK8sResourceQuota

func NewK8sResourceQuota() K8sNewWorkload

func NewK8sRole

func NewK8sRole() K8sNewWorkload

func NewK8sRoleBinding

func NewK8sRoleBinding() K8sNewWorkload

func NewK8sSecret

func NewK8sSecret() K8sNewWorkload

func NewK8sService

func NewK8sService() K8sNewWorkload

func NewK8sServiceAccount

func NewK8sServiceAccount() K8sNewWorkload

func NewK8sStatefulset

func NewK8sStatefulset() K8sNewWorkload

func NewK8sStorageClass

func NewK8sStorageClass() K8sNewWorkload

func NewK8sVolume

func NewK8sVolume() K8sNewWorkload

func NewK8sVolumeAttachment

func NewK8sVolumeAttachment() K8sNewWorkload

func NewK8sVolumeSnapshots

func NewK8sVolumeSnapshots() K8sNewWorkload

func NewWorkload

func NewWorkload(name string, yaml string, description string) K8sNewWorkload

type K8sWorkloadResult

type K8sWorkloadResult struct {
	Result interface{} `json:"result,omitempty"`
	Error  interface{} `json:"error,omitempty"`
}

func AllCertificateSigningRequests

func AllCertificateSigningRequests(namespaceName string) K8sWorkloadResult

func AllClusterIssuers

func AllClusterIssuers() K8sWorkloadResult

func AllClusterRoleBindings

func AllClusterRoleBindings() K8sWorkloadResult

func AllClusterRoles

func AllClusterRoles() K8sWorkloadResult

func AllCronjobs

func AllCronjobs(namespaceName string) K8sWorkloadResult

func AllCustomResourceDefinitions

func AllCustomResourceDefinitions() K8sWorkloadResult

func AllEndpoints

func AllEndpoints(namespaceName string) K8sWorkloadResult

func AllEvents

func AllEvents(namespaceName string) K8sWorkloadResult

func AllHpas

func AllHpas(namespaceName string) K8sWorkloadResult

func AllIssuer

func AllIssuer(namespaceName string) K8sWorkloadResult

func AllJobs

func AllJobs(namespaceName string) K8sWorkloadResult

func AllK8sCertificates

func AllK8sCertificates(namespaceName string) K8sWorkloadResult

func AllK8sConfigmaps

func AllK8sConfigmaps(namespaceName string) K8sWorkloadResult

func AllK8sDaemonsets

func AllK8sDaemonsets(namespaceName string) K8sWorkloadResult

func AllK8sDeployments

func AllK8sDeployments(namespaceName string) K8sWorkloadResult

func AllK8sIngresses

func AllK8sIngresses(namespaceName string) K8sWorkloadResult

func AllK8sPersistentVolumeClaims

func AllK8sPersistentVolumeClaims(namespaceName string) K8sWorkloadResult

func AllK8sPods

func AllK8sPods(namespaceName string) K8sWorkloadResult

func AllK8sReplicasets

func AllK8sReplicasets(namespaceName string) K8sWorkloadResult

func AllK8sSecrets

func AllK8sSecrets(namespaceName string) K8sWorkloadResult

func AllK8sServices

func AllK8sServices(namespaceName string) K8sWorkloadResult

func AllLeases

func AllLeases(namespaceName string) K8sWorkloadResult

func AllNetworkPolicies

func AllNetworkPolicies(namespaceName string) K8sWorkloadResult

func AllOrders

func AllOrders(namespaceName string) K8sWorkloadResult

func AllPersistentVolumes

func AllPersistentVolumes() K8sWorkloadResult

func AllPriorityClasses

func AllPriorityClasses() K8sWorkloadResult

func AllResourceQuotas

func AllResourceQuotas(namespaceName string) K8sWorkloadResult

func AllRoleBindings

func AllRoleBindings(namespaceName string) K8sWorkloadResult

func AllRoles

func AllRoles(namespaceName string) K8sWorkloadResult

func AllServiceAccounts

func AllServiceAccounts(namespaceName string) K8sWorkloadResult

func AllStatefulSets

func AllStatefulSets(namespaceName string) K8sWorkloadResult

func AllStorageClasses

func AllStorageClasses() K8sWorkloadResult

func AllVolumeAttachments

func AllVolumeAttachments() K8sWorkloadResult

func AllVolumeSnapshots

func AllVolumeSnapshots(namespace string) K8sWorkloadResult

func CreateK8sCertificate

func CreateK8sCertificate(data cmapi.Certificate) K8sWorkloadResult

func CreateK8sCertificateSigningRequest

func CreateK8sCertificateSigningRequest(data cmapi.CertificateRequest) K8sWorkloadResult

func CreateK8sClusterIssuer

func CreateK8sClusterIssuer(data cmapi.ClusterIssuer) K8sWorkloadResult

func CreateK8sClusterRole

func CreateK8sClusterRole(data v1.ClusterRole) K8sWorkloadResult

func CreateK8sClusterRoleBinding

func CreateK8sClusterRoleBinding(data v1.ClusterRoleBinding) K8sWorkloadResult

func CreateK8sConfigMap

func CreateK8sConfigMap(data v1.ConfigMap) K8sWorkloadResult

func CreateK8sCronJob

func CreateK8sCronJob(data v1.CronJob) K8sWorkloadResult

func CreateK8sCustomResourceDefinition

func CreateK8sCustomResourceDefinition(data apiExt.CustomResourceDefinition) K8sWorkloadResult

func CreateK8sDaemonSet

func CreateK8sDaemonSet(data v1.DaemonSet) K8sWorkloadResult

func CreateK8sDeployment

func CreateK8sDeployment(data v1.Deployment) K8sWorkloadResult

func CreateK8sEndpoint

func CreateK8sEndpoint(data corev1.Endpoints) K8sWorkloadResult

func CreateK8sIngress

func CreateK8sIngress(data v1.Ingress) K8sWorkloadResult

func CreateK8sIssuer

func CreateK8sIssuer(data cmapi.Issuer) K8sWorkloadResult

func CreateK8sJob

func CreateK8sJob(data v1job.Job) K8sWorkloadResult

func CreateK8sLease

func CreateK8sLease(data v1.Lease) K8sWorkloadResult

func CreateK8sNamespace

func CreateK8sNamespace(data v1.Namespace) K8sWorkloadResult

func CreateK8sNetworkpolicy

func CreateK8sNetworkpolicy(data v1.NetworkPolicy) K8sWorkloadResult

func CreateK8sOrder

func CreateK8sOrder(data v1.Order) K8sWorkloadResult

func CreateK8sPersistentVolume

func CreateK8sPersistentVolume(data core.PersistentVolume) K8sWorkloadResult

func CreateK8sPersistentVolumeClaim

func CreateK8sPersistentVolumeClaim(data core.PersistentVolumeClaim) K8sWorkloadResult

func CreateK8sPod

func CreateK8sPod(data v1.Pod) K8sWorkloadResult

func CreateK8sPriorityClass

func CreateK8sPriorityClass(data v1.PriorityClass) K8sWorkloadResult

func CreateK8sReplicaSet

func CreateK8sReplicaSet(data v1.ReplicaSet) K8sWorkloadResult

func CreateK8sResourceQuota

func CreateK8sResourceQuota(data core.ResourceQuota) K8sWorkloadResult

func CreateK8sRole

func CreateK8sRole(data v1.Role) K8sWorkloadResult

func CreateK8sRoleBinding

func CreateK8sRoleBinding(data v1.RoleBinding) K8sWorkloadResult

func CreateK8sSecret

func CreateK8sSecret(data v1.Secret) K8sWorkloadResult

func CreateK8sService

func CreateK8sService(data v1.Service) K8sWorkloadResult

func CreateK8sServiceAccount

func CreateK8sServiceAccount(data v1.ServiceAccount) K8sWorkloadResult

func CreateK8sStatefulset

func CreateK8sStatefulset(data v1.StatefulSet) K8sWorkloadResult

func CreateK8sStorageClass

func CreateK8sStorageClass(data storage.StorageClass) K8sWorkloadResult

func CreateK8sVolumeAttachment

func CreateK8sVolumeAttachment(data storage.VolumeAttachment) K8sWorkloadResult

func CreateK8sVolumeSnapshot

func CreateK8sVolumeSnapshot(data snap.VolumeSnapshot) K8sWorkloadResult

func DeleteK8sCertificate

func DeleteK8sCertificate(data cmapi.Certificate) K8sWorkloadResult

func DeleteK8sCertificateSigningRequest

func DeleteK8sCertificateSigningRequest(data cmapi.CertificateRequest) K8sWorkloadResult

func DeleteK8sClusterIssuer

func DeleteK8sClusterIssuer(data cmapi.ClusterIssuer) K8sWorkloadResult

func DeleteK8sClusterRole

func DeleteK8sClusterRole(data v1.ClusterRole) K8sWorkloadResult

func DeleteK8sClusterRoleBinding

func DeleteK8sClusterRoleBinding(data v1.ClusterRoleBinding) K8sWorkloadResult

func DeleteK8sConfigmap

func DeleteK8sConfigmap(data v1.ConfigMap) K8sWorkloadResult

func DeleteK8sCronJob

func DeleteK8sCronJob(data v1job.CronJob) K8sWorkloadResult

func DeleteK8sCustomResourceDefinition

func DeleteK8sCustomResourceDefinition(data apiExt.CustomResourceDefinition) K8sWorkloadResult

func DeleteK8sDaemonSet

func DeleteK8sDaemonSet(data v1.DaemonSet) K8sWorkloadResult

func DeleteK8sDeployment

func DeleteK8sDeployment(data v1.Deployment) K8sWorkloadResult

func DeleteK8sEndpoint

func DeleteK8sEndpoint(data corev1.Endpoints) K8sWorkloadResult

func DeleteK8sIngress

func DeleteK8sIngress(data v1.Ingress) K8sWorkloadResult

func DeleteK8sIssuer

func DeleteK8sIssuer(data cmapi.Issuer) K8sWorkloadResult

func DeleteK8sJob

func DeleteK8sJob(data v1job.Job) K8sWorkloadResult

func DeleteK8sLease

func DeleteK8sLease(data v1.Lease) K8sWorkloadResult

func DeleteK8sNamespace

func DeleteK8sNamespace(data v1.Namespace) K8sWorkloadResult

func DeleteK8sNetworkPolicy

func DeleteK8sNetworkPolicy(data v1.NetworkPolicy) K8sWorkloadResult

func DeleteK8sOrder

func DeleteK8sOrder(data v1.Order) K8sWorkloadResult

func DeleteK8sPersistentVolume

func DeleteK8sPersistentVolume(data core.PersistentVolume) K8sWorkloadResult

func DeleteK8sPersistentVolumeClaim

func DeleteK8sPersistentVolumeClaim(data core.PersistentVolumeClaim) K8sWorkloadResult

func DeleteK8sPod

func DeleteK8sPod(data v1.Pod) K8sWorkloadResult

func DeleteK8sPriorityClass

func DeleteK8sPriorityClass(data v1.PriorityClass) K8sWorkloadResult

func DeleteK8sReplicaset

func DeleteK8sReplicaset(data v1.ReplicaSet) K8sWorkloadResult

func DeleteK8sResourceQuota

func DeleteK8sResourceQuota(data core.ResourceQuota) K8sWorkloadResult

func DeleteK8sRole

func DeleteK8sRole(data v1.Role) K8sWorkloadResult

func DeleteK8sRoleBinding

func DeleteK8sRoleBinding(data v1.RoleBinding) K8sWorkloadResult

func DeleteK8sSecret

func DeleteK8sSecret(data v1.Secret) K8sWorkloadResult

func DeleteK8sService

func DeleteK8sService(data v1.Service) K8sWorkloadResult

func DeleteK8sServiceAccount

func DeleteK8sServiceAccount(data v1.ServiceAccount) K8sWorkloadResult

func DeleteK8sStatefulset

func DeleteK8sStatefulset(data v1.StatefulSet) K8sWorkloadResult

func DeleteK8sStorageClass

func DeleteK8sStorageClass(data storage.StorageClass) K8sWorkloadResult

func DeleteK8sVolumeAttachment

func DeleteK8sVolumeAttachment(data storage.VolumeAttachment) K8sWorkloadResult

func DeleteK8sVolumeSnapshot

func DeleteK8sVolumeSnapshot(data snap.VolumeSnapshot) K8sWorkloadResult

func DescribeK8sCertificate

func DescribeK8sCertificate(namespace string, name string) K8sWorkloadResult

func DescribeK8sCertificateSigningRequest

func DescribeK8sCertificateSigningRequest(namespace string, name string) K8sWorkloadResult

func DescribeK8sClusterIssuer

func DescribeK8sClusterIssuer(name string) K8sWorkloadResult

func DescribeK8sClusterRole

func DescribeK8sClusterRole(name string) K8sWorkloadResult

func DescribeK8sClusterRoleBinding

func DescribeK8sClusterRoleBinding(name string) K8sWorkloadResult

func DescribeK8sConfigmap

func DescribeK8sConfigmap(namespace string, name string) K8sWorkloadResult

func DescribeK8sCronJob

func DescribeK8sCronJob(namespace string, name string) K8sWorkloadResult

func DescribeK8sCustomResourceDefinition

func DescribeK8sCustomResourceDefinition(name string) K8sWorkloadResult

func DescribeK8sDaemonSet

func DescribeK8sDaemonSet(namespace string, name string) K8sWorkloadResult

func DescribeK8sDeployment

func DescribeK8sDeployment(namespace string, name string) K8sWorkloadResult

func DescribeK8sEndpoint

func DescribeK8sEndpoint(namespace string, name string) K8sWorkloadResult

func DescribeK8sEvent

func DescribeK8sEvent(namespace string, name string) K8sWorkloadResult

func DescribeK8sHpa

func DescribeK8sHpa(namespace string, name string) K8sWorkloadResult

func DescribeK8sIngress

func DescribeK8sIngress(namespace string, name string) K8sWorkloadResult

func DescribeK8sIssuer

func DescribeK8sIssuer(namespace string, name string) K8sWorkloadResult

func DescribeK8sJob

func DescribeK8sJob(namespace string, name string) K8sWorkloadResult

func DescribeK8sLease

func DescribeK8sLease(namespace string, name string) K8sWorkloadResult

func DescribeK8sNamespace

func DescribeK8sNamespace(name string) K8sWorkloadResult

func DescribeK8sNetworkPolicy

func DescribeK8sNetworkPolicy(namespace string, name string) K8sWorkloadResult

func DescribeK8sNode

func DescribeK8sNode(name string) K8sWorkloadResult

func DescribeK8sOrder

func DescribeK8sOrder(namespace string, name string) K8sWorkloadResult

func DescribeK8sPersistentVolume

func DescribeK8sPersistentVolume(name string) K8sWorkloadResult

func DescribeK8sPersistentVolumeClaim

func DescribeK8sPersistentVolumeClaim(namespace string, name string) K8sWorkloadResult

func DescribeK8sPod

func DescribeK8sPod(namespace string, name string) K8sWorkloadResult

func DescribeK8sPriorityClass

func DescribeK8sPriorityClass(name string) K8sWorkloadResult

func DescribeK8sReplicaset

func DescribeK8sReplicaset(namespace string, name string) K8sWorkloadResult

func DescribeK8sResourceQuota

func DescribeK8sResourceQuota(namespace string, name string) K8sWorkloadResult

func DescribeK8sRole

func DescribeK8sRole(namespace string, name string) K8sWorkloadResult

func DescribeK8sRoleBinding

func DescribeK8sRoleBinding(namespace string, name string) K8sWorkloadResult

func DescribeK8sSecret

func DescribeK8sSecret(namespace string, name string) K8sWorkloadResult

func DescribeK8sService

func DescribeK8sService(namespace string, name string) K8sWorkloadResult

func DescribeK8sServiceAccount

func DescribeK8sServiceAccount(namespace string, name string) K8sWorkloadResult

func DescribeK8sStatefulset

func DescribeK8sStatefulset(namespace string, name string) K8sWorkloadResult

func DescribeK8sStorageClass

func DescribeK8sStorageClass(name string) K8sWorkloadResult

func DescribeK8sVolumeAttachment

func DescribeK8sVolumeAttachment(name string) K8sWorkloadResult

func DescribeK8sVolumeSnapshot

func DescribeK8sVolumeSnapshot(namespace string, name string) K8sWorkloadResult

func ListK8sNamespaces

func ListK8sNamespaces(namespaceName string) K8sWorkloadResult

func ListK8sNodes

func ListK8sNodes() K8sWorkloadResult

func UpdateK8sCertificate

func UpdateK8sCertificate(data cmapi.Certificate) K8sWorkloadResult

func UpdateK8sCertificateSigningRequest

func UpdateK8sCertificateSigningRequest(data cmapi.CertificateRequest) K8sWorkloadResult

func UpdateK8sClusterIssuer

func UpdateK8sClusterIssuer(data cmapi.ClusterIssuer) K8sWorkloadResult

func UpdateK8sClusterRole

func UpdateK8sClusterRole(data v1.ClusterRole) K8sWorkloadResult

func UpdateK8sClusterRoleBinding

func UpdateK8sClusterRoleBinding(data v1.ClusterRoleBinding) K8sWorkloadResult

func UpdateK8sConfigMap

func UpdateK8sConfigMap(data v1.ConfigMap) K8sWorkloadResult

func UpdateK8sCronJob

func UpdateK8sCronJob(data v1.CronJob) K8sWorkloadResult

func UpdateK8sCustomResourceDefinition

func UpdateK8sCustomResourceDefinition(data apiExt.CustomResourceDefinition) K8sWorkloadResult

func UpdateK8sDaemonSet

func UpdateK8sDaemonSet(data v1.DaemonSet) K8sWorkloadResult

func UpdateK8sDeployment

func UpdateK8sDeployment(data v1.Deployment) K8sWorkloadResult

func UpdateK8sEndpoint

func UpdateK8sEndpoint(data corev1.Endpoints) K8sWorkloadResult

func UpdateK8sIngress

func UpdateK8sIngress(data v1.Ingress) K8sWorkloadResult

func UpdateK8sIssuer

func UpdateK8sIssuer(data cmapi.Issuer) K8sWorkloadResult

func UpdateK8sJob

func UpdateK8sJob(data v1job.Job) K8sWorkloadResult

func UpdateK8sLease

func UpdateK8sLease(data v1.Lease) K8sWorkloadResult

func UpdateK8sNetworkPolicy

func UpdateK8sNetworkPolicy(data v1.NetworkPolicy) K8sWorkloadResult

func UpdateK8sOrder

func UpdateK8sOrder(data v1.Order) K8sWorkloadResult

func UpdateK8sPersistentVolume

func UpdateK8sPersistentVolume(data core.PersistentVolume) K8sWorkloadResult

func UpdateK8sPersistentVolumeClaim

func UpdateK8sPersistentVolumeClaim(data core.PersistentVolumeClaim) K8sWorkloadResult

func UpdateK8sPod

func UpdateK8sPod(data v1.Pod) K8sWorkloadResult

func UpdateK8sPriorityClass

func UpdateK8sPriorityClass(data v1.PriorityClass) K8sWorkloadResult

func UpdateK8sReplicaset

func UpdateK8sReplicaset(data v1.ReplicaSet) K8sWorkloadResult

func UpdateK8sResourceQuota

func UpdateK8sResourceQuota(data core.ResourceQuota) K8sWorkloadResult

func UpdateK8sRole

func UpdateK8sRole(data v1.Role) K8sWorkloadResult

func UpdateK8sRoleBinding

func UpdateK8sRoleBinding(data v1.RoleBinding) K8sWorkloadResult

func UpdateK8sSecret

func UpdateK8sSecret(data v1.Secret) K8sWorkloadResult

func UpdateK8sService

func UpdateK8sService(data v1.Service) K8sWorkloadResult

func UpdateK8sServiceAccount

func UpdateK8sServiceAccount(data v1.ServiceAccount) K8sWorkloadResult

func UpdateK8sStatefulset

func UpdateK8sStatefulset(data v1.StatefulSet) K8sWorkloadResult

func UpdateK8sStorageClass

func UpdateK8sStorageClass(data storage.StorageClass) K8sWorkloadResult

func UpdateK8sVolumeAttachment

func UpdateK8sVolumeAttachment(data storage.VolumeAttachment) K8sWorkloadResult

func UpdateK8sVolumeSnapshot

func UpdateK8sVolumeSnapshot(data snap.VolumeSnapshot) K8sWorkloadResult

func WorkloadResult

func WorkloadResult(result interface{}, err interface{}) K8sWorkloadResult

func WorkloadResultError

func WorkloadResultError(error string) K8sWorkloadResult

type KubeProvider

type KubeProvider struct {
	ClientSet    *kubernetes.Clientset
	ClientConfig rest.Config
}

func NewKubeProvider

func NewKubeProvider() *KubeProvider

type KubeProviderCertManager

type KubeProviderCertManager struct {
	ClientSet    *cmclientset.Clientset
	ClientConfig rest.Config
}

func NewKubeProviderCertManager

func NewKubeProviderCertManager() *KubeProviderCertManager

type KubeProviderMetrics

type KubeProviderMetrics struct {
	ClientSet    *metricsv.Clientset
	ClientConfig rest.Config
}

func NewKubeProviderMetrics

func NewKubeProviderMetrics() *KubeProviderMetrics

type KubeProviderSnapshot

type KubeProviderSnapshot struct {
	ClientSet    *snapClientset.Clientset
	ClientConfig rest.Config
}

func NewKubeProviderSnapshot

func NewKubeProviderSnapshot() *KubeProviderSnapshot

type MogeniusNfsInstallationStatus

type MogeniusNfsInstallationStatus struct {
	Error       string `json:"error,omitempty"`
	IsInstalled bool   `json:"isInstalled"`
}

type PortForwardAPodRequest

type PortForwardAPodRequest struct {
	Pod       v1.Pod
	LocalPort int
	PodPort   int
	Out       *bytes.Buffer
	ErrOut    *bytes.Buffer
	// StopCh is the channel used to manage the port forward lifecycle
	StopCh <-chan struct{}
	// ReadyCh communicates when the tunnel is ready to receive traffic
	ReadyCh chan struct{}
}

type ServiceGetLogErrorResult

type ServiceGetLogErrorResult struct {
	Namespace string `json:"namespace"`
	PodId     string `json:"podId"`
	Restarts  int32  `json:"restarts"`
	Log       string `json:"log"`
}

func GetLogError

func GetLogError(namespace string, podId string) ServiceGetLogErrorResult

type ServiceGetLogResult

type ServiceGetLogResult struct {
	Namespace       string    `json:"namespace"`
	PodId           string    `json:"podId"`
	ServerTimestamp time.Time `json:"serverTimestamp"`
	Log             string    `json:"log"`
}

func GetLog

func GetLog(namespace string, podId string, timestamp *time.Time) ServiceGetLogResult

type ServicePodExistsResult

type ServicePodExistsResult struct {
	PodExists bool `json:"podExists"`
}

func PodExists

func PodExists(namespace string, name string) ServicePodExistsResult

Jump to

Keyboard shortcuts

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