Documentation ¶
Index ¶
- Constants
- Variables
- func CertificateCovers(certDomain string, domain string) bool
- func ContextNameForCluster(cloud, cluster string) string
- func CreateConfigMap(appName string, ac *v1alpha1.AppConfig, sharedConfigs []*v1alpha1.AppConfig) *corev1.ConfigMap
- func ForEach(kclient client.Client, listObj runtime.Object, ...) error
- func GetActiveRelease(kclient client.Client, app, target string) (*v1alpha1.AppRelease, error)
- func GetAppByName(kclient client.Client, name string) (app *v1alpha1.App, err error)
- func GetAppConfig(kclient client.Client, app, target string) (ac *v1alpha1.AppConfig, err error)
- func GetAppRelease(kclient client.Client, app, target, name string) (*v1alpha1.AppRelease, error)
- func GetAppReleaseByName(kclient client.Client, release string, target string) (ar *v1alpha1.AppRelease, err error)
- func GetAppReleases(kclient client.Client, app string, target string) ([]*v1alpha1.AppRelease, error)
- func GetAppTarget(kclient client.Client, name string) (*v1alpha1.AppTarget, error)
- func GetAppTargetWithLabels(kclient client.Client, app, target string) (*v1alpha1.AppTarget, error)
- func GetAppTargets(kclient client.Client, appName string) (targets []v1alpha1.AppTarget, err error)
- func GetBuildByName(kclient client.Client, name string) (*v1alpha1.Build, error)
- func GetCertificateForDomain(kclient client.Client, domain string) (cert *v1alpha1.CertificateRef, err error)
- func GetCertificatesForHosts(kclient client.Client, hosts []string) (certs map[string]*v1alpha1.CertificateRef, err error)
- func GetClusterConfig(kclient client.Client) (cc *v1alpha1.ClusterConfig, err error)
- func GetConfigForType(kclient client.Client, confType v1alpha1.ConfigType, name string, ...) (ac *v1alpha1.AppConfig, err error)
- func GetConfigMap(kclient client.Client, namespace string, name string) (cm *corev1.ConfigMap, err error)
- func GetFirstDeployableRelease(releases []*v1alpha1.AppRelease) *v1alpha1.AppRelease
- func GetIngressRequests(kclient client.Client, target string) (irs []*v1alpha1.IngressRequest, err error)
- func GetIngressRequestsForAppProtocol(kclient client.Client, target string, protocol string) (irs []*v1alpha1.IngressRequest, err error)
- func GetLatestBuild(kclient client.Client, registry, image string) (build *v1alpha1.Build, err error)
- func GetMergedConfigForType(kclient client.Client, confType v1alpha1.ConfigType, name, target string) (ac *v1alpha1.AppConfig, err error)
- func GetNamespace(kclient client.Client, namespace string) (*corev1.Namespace, error)
- func GetNodepools(kclient client.Client) (pools []*v1alpha1.Nodepool, err error)
- func GetNodesForNodepool(kclient client.Client, npName string) (nodes []*corev1.Node, err error)
- func GetPodsForAppRelease(kclient client.Client, namespace string, release string) (pods []*corev1.Pod, err error)
- func GetReplicaSetForAppRelease(kclient client.Client, ar *v1alpha1.AppRelease) (rs *appsv1.ReplicaSet, err error)
- func GetSecret(kclient client.Client, namespace, name string) (secret *v1.Secret, err error)
- func GetSecretForAccount(kclient client.Client, namespace, name string) (secret *v1.Secret, err error)
- func GetService(kclient client.Client, namespace, name string) (svc *corev1.Service, err error)
- func GetServiceHostEnvForReference(kclient client.Client, ref v1alpha1.AppReference, defaultTarget string) (envs []corev1.EnvVar, err error)
- func GetTargetRelease(kclient client.Client, app, target string) (*v1alpha1.AppRelease, error)
- func KubeConfigContainsClusters(kconf *cliv1.Config, cloud string, clusters []string) bool
- func LabelsForBuild(build *v1alpha1.Build) map[string]string
- func ListApps(kclient client.Client) (apps []v1alpha1.App, err error)
- func ListCertificates(kclient client.Client) (certificates []v1alpha1.CertificateRef, err error)
- func LogUpdates(log logr.Logger, op controllerutil.OperationResult, message string, ...)
- func NewKubeConfig() *cliv1.Config
- func NewYAMLDecoder() runtime.Decoder
- func NewYAMLEncoder() runtime.Encoder
- func NodepoolName() string
- func NodepoolNameFromNode(node *corev1.Node) string
- func ReadObjectFromFile(decoder runtime.Decoder, filename string, obj runtime.Object) (res runtime.Object, err error)
- func SaveAppConfig(kclient client.Client, ac *v1alpha1.AppConfig) error
- func ServiceHostname(namespace, service string) string
- func SortAppReleasesByLatest(releases []*v1alpha1.AppRelease)
- func ToEnvVar(s string) string
- func TopLevelDomain(domain string) string
- func UpdateKubeConfig(kconf *cliv1.Config, cliPath string, clusters []*KubeClusterConfig, ...)
- func UpdateResource(kclient client.Client, object, owner metav1.Object, scheme *runtime.Scheme) (result controllerutil.OperationResult, err error)
- func UpdateResourceWithMerge(kclient client.Client, object, owner metav1.Object, scheme *runtime.Scheme) (result controllerutil.OperationResult, err error)
- type DependencyInfo
- type Exporter
- type Importer
- type KubeClusterConfig
Constants ¶
View Source
const ( IstioNamespace = "istio-system" KubeSystemNamespace = "kube-system" KonSystemNamespace = "kon-system" GrafanaNamespace = "grafana" IngressBackendName = "istio-ingressgateway" IngressHealthPath = "/healthz/ready" IngressGatewayName = "ingressgateway" MeshGatewayName = "mesh" )
View Source
const ( NodepoolPrefix = "kon-nodepool" NodepoolLabel = "k11n.dev/nodepool" AppLabel = "k11n.dev/app" TargetLabel = "k11n.dev/target" BuildRegistryLabel = "k11n.dev/buildRegistry" BuildImageLabel = "k11n.dev/buildImage" BuildLabel = "k11n.dev/build" BuildTypeLabel = "k11n.dev/buildType" AppReleaseLabel = "k11n.dev/appRelease" DomainLabel = "k11n.dev/domain" TargetReleaseLabel = "k11n.dev/targetRelease" AppProtocolLabel = "k11n.dev/appProtocol" KubeManagedByLabel = "app.kubernetes.io/managed-by" KubeAppLabel = "app" KubeAppVersionLabel = "app.kubernetes.io/version" KubeAppInstanceLabel = "app.kubernetes.io/instance" IstioInjectLabel = "istio-injection" Konstellation = "konstellation" BuildTypeLatest = "latest" )
View Source
const (
GatewayName = "ingressgateway"
)
View Source
const (
SERVICE_ACCOUNT_KON_ADMIN = "kon-admin"
)
Variables ¶
View Source
var ( ErrNotFound = fmt.Errorf("the resource is not found") Break = fmt.Errorf("") )
Functions ¶
func CertificateCovers ¶
Checks if certificate can cover the domain
func ContextNameForCluster ¶
func CreateConfigMap ¶
func ForEach ¶
func ForEach(kclient client.Client, listObj runtime.Object, eachFunc func(item interface{}) error, opts ...client.ListOption) error
*
- Helper function to iterate through all resources in a list
func GetActiveRelease ¶
func GetAppByName ¶
func GetAppConfig ¶
func GetAppRelease ¶
func GetAppReleaseByName ¶
func GetAppReleases ¶
func GetAppTarget ¶
func GetAppTargetWithLabels ¶
func GetAppTargets ¶
func GetBuildByName ¶
func GetCertificateForDomain ¶
func GetCertificatesForHosts ¶
func GetClusterConfig ¶
func GetClusterConfig(kclient client.Client) (cc *v1alpha1.ClusterConfig, err error)
func GetConfigForType ¶
func GetConfigMap ¶
func GetFirstDeployableRelease ¶
func GetFirstDeployableRelease(releases []*v1alpha1.AppRelease) *v1alpha1.AppRelease
func GetIngressRequests ¶ added in v0.5.2
func GetIngressRequestsForAppProtocol ¶ added in v0.5.8
func GetLatestBuild ¶
func GetMergedConfigForType ¶
func GetNamespace ¶
func GetNodepools ¶
func GetNodesForNodepool ¶
func GetPodsForAppRelease ¶
func GetReplicaSetForAppRelease ¶
func GetReplicaSetForAppRelease(kclient client.Client, ar *v1alpha1.AppRelease) (rs *appsv1.ReplicaSet, err error)
func GetSecretForAccount ¶
func GetService ¶
func GetTargetRelease ¶
func ListCertificates ¶
func ListCertificates(kclient client.Client) (certificates []v1alpha1.CertificateRef, err error)
func LogUpdates ¶
func LogUpdates(log logr.Logger, op controllerutil.OperationResult, message string, keysAndValues ...interface{})
func NewKubeConfig ¶
func NewYAMLDecoder ¶
func NewYAMLEncoder ¶
func NodepoolName ¶
func NodepoolName() string
func NodepoolNameFromNode ¶
func ReadObjectFromFile ¶
func ServiceHostname ¶
func SortAppReleasesByLatest ¶
func SortAppReleasesByLatest(releases []*v1alpha1.AppRelease)
func TopLevelDomain ¶
func UpdateKubeConfig ¶
func UpdateKubeConfig(kconf *cliv1.Config, cliPath string, clusters []*KubeClusterConfig, selectedIndex int)
func UpdateResource ¶
func UpdateResource(kclient client.Client, object, owner metav1.Object, scheme *runtime.Scheme) (result controllerutil.OperationResult, err error)
func UpdateResourceWithMerge ¶
func UpdateResourceWithMerge(kclient client.Client, object, owner metav1.Object, scheme *runtime.Scheme) (result controllerutil.OperationResult, err error)
Types ¶
type DependencyInfo ¶
func GetDependencyInfos ¶
func GetDependencyInfos(kclient client.Client, ref v1alpha1.AppReference, defaultTarget string) (deps []DependencyInfo, err error)
For when running locally, return dependency data so proxies can be created
func (DependencyInfo) HostKey ¶
func (d DependencyInfo) HostKey() string
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
func (*Exporter) ExportApps ¶
func (*Exporter) ExportBuilds ¶
func (*Exporter) ExportConfigs ¶
func (*Exporter) ExportLinkedAccounts ¶
type Importer ¶
type Importer struct {
// contains filtered or unexported fields
}
func (*Importer) ImportApps ¶
func (*Importer) ImportBuilds ¶
func (*Importer) ImportConfigs ¶
func (*Importer) ImportLinkedAccounts ¶
type KubeClusterConfig ¶
func (*KubeClusterConfig) Name ¶
func (c *KubeClusterConfig) Name() string
func (*KubeClusterConfig) User ¶
func (c *KubeClusterConfig) User() string
Click to show internal directories.
Click to hide internal directories.