Documentation ¶
Index ¶
- Constants
- Variables
- func BytesToHumanReadable(b int64) string
- func ConfirmTask(s string, tries int) bool
- func Contains(s []string, str string) bool
- func ContainsInt(v int, a []int) bool
- func CreateDirIfNotExist(dir string)
- func DeleteDirIfExist(dir string)
- func Diff(a []string, b []string) []string
- func FillWith(s string, targetLength int, chars string) string
- func FunctionName() string
- func GetDirectories(customConfigPath string) (configDir string, configPath string)
- func HttpHeader(additionalName string) http.Header
- func HumanDuration(d time.Duration) string
- func InitCertificate() cmapi.Certificate
- func InitCertificateSigningRequestYaml() string
- func InitCertificateYaml() string
- func InitClusterIssuerYaml() string
- func InitClusterRoleBindingYaml() string
- func InitClusterRoleYaml() string
- func InitConfigMap() core.ConfigMap
- func InitConfigMapYaml() string
- func InitConfigYaml(showDebug bool, customConfigName string, useInClusterConfig bool)
- func InitContainerSecret() core.Secret
- func InitContainerSecretYaml() string
- func InitCronJob() v1job.CronJob
- func InitCronJobYaml() string
- func InitCustomResourceDefinitionYaml() string
- func InitDaemonsetYaml() string
- func InitDeployment() v1.Deployment
- func InitDeploymentYaml() string
- func InitEndPointYaml() string
- func InitHpaYaml() string
- func InitIngresYaml() string
- func InitIngress() netv1.Ingress
- func InitIngressYaml() string
- func InitIssuerYaml() string
- func InitJobYaml() string
- func InitLeaseYaml() string
- func InitNamespaceYaml() string
- func InitNetPolNamespace() netv1.NetworkPolicy
- func InitNetPolNamespaceYaml() string
- func InitNetPolService() netv1.NetworkPolicy
- func InitNetPolServiceYaml() string
- func InitNetPolYaml() string
- func InitOrderYaml() string
- func InitPersistentVolume() core.PersistentVolume
- func InitPersistentVolumeClaim() core.PersistentVolumeClaim
- func InitPersistentVolumeClaimYaml() string
- func InitPersistentVolumeYaml() string
- func InitPodYaml() string
- func InitPriorityClassYaml() string
- func InitPunqIngress() netv1.Ingress
- func InitPunqService() core.Service
- func InitReplicaSetYaml() string
- func InitResourceQuotaYaml() string
- func InitRoleBindingYaml() string
- func InitRoleYaml() string
- func InitSecret() core.Secret
- func InitSecretYaml() string
- func InitService() core.Service
- func InitServiceAccountExampleYaml() string
- func InitServiceExampleYaml() string
- func InitServiceYaml() string
- func InitStatefulsetYaml() string
- func InitStorageClassYaml() string
- func InitUpgradeConfigMap() core.ConfigMap
- func InitUpgradeJob() v1job.Job
- func InitVolumeAttachmentYaml() string
- func InitVolumeSnapshotYaml() string
- func IsNewReleaseIsAvailable() bool
- func JsonStringToHumanDuration(jsonTime string) string
- func NanoId() string
- func NanoIdExtraLong() string
- func NumberToHumanReadable(b uint64) string
- func OpenBrowser(url string)
- func ParseJsonStringArray(input string) []string
- func Pointer[K any](val K) *K
- func PrintChangeLog()
- func PrintLogo()
- func PrintSettings()
- func PrintVersionInfo()
- func QuickHash(s string) string
- func Remove[T any](slice []T, s int) []T
- func Round(num float64) int
- func ToFixed(num float64, precision int) float64
- func TruncateText(s string, max int) string
- func WriteDefaultConfig(useInClusterConfig bool)
- type ClusterSecret
- type Config
- type Release
- type ResponseError
Constants ¶
View Source
const APP_NAME = "k8s"
View Source
const CONTEXTOWN = "own-context"
View Source
const CONTEXTSSECRET = "punq-contexts"
View Source
const USERADMIN = "admin"
View Source
const USERSSECRET = "punq-users"
Variables ¶
View Source
var ChangeLog string
View Source
var ConfigPath string
View Source
var DefaultConfigFileDev string
View Source
var DefaultConfigFileProd string
View Source
var DefaultConfigLocalFile string
View Source
var YamlTemplatesFolder embed.FS
Functions ¶
func BytesToHumanReadable ¶
func ConfirmTask ¶
func ContainsInt ¶
func CreateDirIfNotExist ¶
func CreateDirIfNotExist(dir string)
func DeleteDirIfExist ¶
func DeleteDirIfExist(dir string)
func FunctionName ¶
func FunctionName() string
func GetDirectories ¶
func HttpHeader ¶
func HumanDuration ¶
TAKEN FROM Kubernetes apimachineryv0.25.1
func InitCertificate ¶
func InitCertificate() cmapi.Certificate
func InitCertificateSigningRequestYaml ¶
func InitCertificateSigningRequestYaml() string
func InitCertificateYaml ¶
func InitCertificateYaml() string
func InitClusterIssuerYaml ¶
func InitClusterIssuerYaml() string
func InitClusterRoleBindingYaml ¶
func InitClusterRoleBindingYaml() string
func InitClusterRoleYaml ¶
func InitClusterRoleYaml() string
func InitConfigMap ¶
func InitConfigMapYaml ¶
func InitConfigMapYaml() string
func InitConfigYaml ¶
func InitContainerSecret ¶
func InitContainerSecretYaml ¶
func InitContainerSecretYaml() string
func InitCronJob ¶
func InitCronJobYaml ¶
func InitCronJobYaml() string
func InitCustomResourceDefinitionYaml ¶
func InitCustomResourceDefinitionYaml() string
func InitDaemonsetYaml ¶
func InitDaemonsetYaml() string
func InitDeployment ¶
func InitDeployment() v1.Deployment
func InitDeploymentYaml ¶
func InitDeploymentYaml() string
func InitEndPointYaml ¶
func InitEndPointYaml() string
func InitHpaYaml ¶
func InitHpaYaml() string
func InitIngresYaml ¶
func InitIngresYaml() string
func InitIngress ¶
func InitIngressYaml ¶
func InitIngressYaml() string
func InitIssuerYaml ¶
func InitIssuerYaml() string
func InitJobYaml ¶
func InitJobYaml() string
func InitLeaseYaml ¶
func InitLeaseYaml() string
func InitNamespaceYaml ¶
func InitNamespaceYaml() string
func InitNetPolNamespace ¶
func InitNetPolNamespace() netv1.NetworkPolicy
func InitNetPolNamespaceYaml ¶
func InitNetPolNamespaceYaml() string
func InitNetPolService ¶
func InitNetPolService() netv1.NetworkPolicy
func InitNetPolServiceYaml ¶
func InitNetPolServiceYaml() string
func InitNetPolYaml ¶
func InitNetPolYaml() string
func InitOrderYaml ¶
func InitOrderYaml() string
func InitPersistentVolume ¶
func InitPersistentVolume() core.PersistentVolume
func InitPersistentVolumeClaim ¶
func InitPersistentVolumeClaim() core.PersistentVolumeClaim
func InitPersistentVolumeClaimYaml ¶
func InitPersistentVolumeClaimYaml() string
func InitPersistentVolumeYaml ¶
func InitPersistentVolumeYaml() string
func InitPodYaml ¶
func InitPodYaml() string
func InitPriorityClassYaml ¶
func InitPriorityClassYaml() string
func InitPunqIngress ¶
func InitPunqService ¶
func InitReplicaSetYaml ¶
func InitReplicaSetYaml() string
func InitResourceQuotaYaml ¶
func InitResourceQuotaYaml() string
func InitRoleBindingYaml ¶
func InitRoleBindingYaml() string
func InitRoleYaml ¶
func InitRoleYaml() string
func InitSecret ¶
func InitSecretYaml ¶
func InitSecretYaml() string
func InitService ¶
func InitServiceAccountExampleYaml ¶
func InitServiceAccountExampleYaml() string
func InitServiceExampleYaml ¶
func InitServiceExampleYaml() string
func InitServiceYaml ¶
func InitServiceYaml() string
func InitStatefulsetYaml ¶
func InitStatefulsetYaml() string
func InitStorageClassYaml ¶
func InitStorageClassYaml() string
func InitUpgradeConfigMap ¶
func InitUpgradeJob ¶
func InitVolumeAttachmentYaml ¶
func InitVolumeAttachmentYaml() string
func InitVolumeSnapshotYaml ¶
func InitVolumeSnapshotYaml() string
func IsNewReleaseIsAvailable ¶
func IsNewReleaseIsAvailable() bool
func NanoIdExtraLong ¶
func NanoIdExtraLong() string
func NumberToHumanReadable ¶
func OpenBrowser ¶
func OpenBrowser(url string)
func ParseJsonStringArray ¶
func PrintChangeLog ¶ added in v1.1.27
func PrintChangeLog()
func PrintSettings ¶
func PrintSettings()
func PrintVersionInfo ¶
func PrintVersionInfo()
func TruncateText ¶
func WriteDefaultConfig ¶
func WriteDefaultConfig(useInClusterConfig bool)
Types ¶
type ClusterSecret ¶
This object will initially created in secrets when the software is installed into the cluster for the first time (resource: secret -> mogenius/mogenius)
type Config ¶
type Config struct { Browser struct { Host string `yaml:"host" env:"browser_host" env-description:"Host of the browser app."` Port int `yaml:"port" env:"browser_port" env-description:"Port of the browser app."` } `yaml:"browser"` Kubernetes struct { ClusterName string `yaml:"cluster_name" env:"cluster_name" env-description:"The Name of the Kubernetes Cluster"` OwnNamespace string `yaml:"own_namespace" env:"OWN_NAMESPACE" env-description:"The Namespace of mogenius platform"` RunInCluster bool `` /* 229-byte string literal not displayed */ ContainerPort int `` /* 128-byte string literal not displayed */ } `yaml:"kubernetes"` Misc struct { Stage string `yaml:"stage" env:"stage" env-description:"mogenius k8s-manager stage" env-default:"prod"` Debug bool `yaml:"debug" env:"debug" env-description:"If set to true, debug features will be enabled." env-default:"false"` CheckForUpdates int `yaml:"check_for_updates" env:"check_for_updates" env-description:"Time interval between update checks." env-default:"86400"` IgnoreNamespaces []string `yaml:"ignore_namespaces" env:"ignore_namespaces" env-description:"List of all ignored namespaces." env-default:""` } `yaml:"misc"` }
var CONFIG Config
type ResponseError ¶
type ResponseError struct {
Error string `json:"error,omitempty"`
}
func CreateError ¶
func CreateError(err error) ResponseError
Click to show internal directories.
Click to hide internal directories.