hub

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: Apache-2.0 Imports: 28 Imported by: 16

README

How to update Hub files in kube-ui-server

export UI_SERVER_NAMESPACE=kubeops
export UI_SERVER_POD=$(kubectl get pods -n $UI_SERVER_NAMESPACE -l app.kubernetes.io/name=kube-ui-server -o jsonpath={.items[0].metadata.name})

kubectl cp hub $UI_SERVER_POD:/tmp -n $UI_SERVER_NAMESPACE
# verify
kubectl exec -it $UI_SERVER_POD -n $UI_SERVER_NAMESPACE -- ls -l /tmp/hub

LOCATION=hub/resourceeditors/kubedb.com/v1alpha2/elasticsearches.yaml
kubectl cp $LOCATION $UI_SERVER_POD:/tmp/$LOCATION -n $UI_SERVER_NAMESPACE
# verify
kubectl exec -it $UI_SERVER_POD -n $UI_SERVER_NAMESPACE -- cat /tmp/$LOCATION

# trigger reload
kubectl exec -it $UI_SERVER_POD -n $UI_SERVER_NAMESPACE -- sh -c "date > /tmp/hub/resourceeditors/trigger"
# verify
kubectl exec -it $UI_SERVER_POD -n $UI_SERVER_NAMESPACE -- cat /tmp/hub/resourceeditors/trigger

How to modify GET & LIST proxy calls

$ cd ~/go/src/kmodules.xyz/resource-metadata
$ ln -s $(pwd)/hub /tmp/hub

# Now modify the trigger file and refresh ui

Documentation

Index

Constants

View Source
const (
	AppsCodeChartsLegacyURL = "https://charts.appscode.com/stable"
	// AppsCodeChartsOCIURL    = "oci://r.appscode.com/charts"
	AppsCodeChartsOCIURL = "oci://ghcr.io/appscode-charts"
	FluxCDChartsURL      = "https://fluxcd-community.github.io/helm-charts"
)
View Source
const (
	EnvVarBootstrapHelmRepositoryName = "BOOTSTRAP_HELM_REPOSITORY_NAME"

	EnvVarBootstrapHelmRepositoryNamespace = "BOOTSTRAP_HELM_REPOSITORY_NAMESPACE"

	BootstrapPresetsName = "bootstrap-presets"

	ChartACE                = "ace"
	ChartACEInstaller       = "ace-installer"
	ChartLicenseProxyServer = "license-proxyserver"
	ChartOpscenterFeatures  = "opscenter-features"

	ChartFluxCD                 = "flux2"
	ChartFluxCDReleaseNamespace = "flux-system"
)
View Source
const (
	CRDIconSVG = "https://cdn.appscode.com/k8s/icons/apiextensions.k8s.io/customresourcedefinitions.svg"
)
View Source
const KnownUID = "__known__"
View Source
const PoolSize = 1024 // This number should match the max number of concurrent clusters handled

Variables

This section is empty.

Functions

func BootstrapHelmRepository added in v0.17.32

func BootstrapHelmRepository(kc client.Client) kmapi.TypedObjectReference

func BootstrapHelmRepositoryName added in v0.17.32

func BootstrapHelmRepositoryName() string

func BootstrapHelmRepositoryNamespace added in v0.17.32

func BootstrapHelmRepositoryNamespace() string

func FeatureValues added in v0.18.11

func FeatureValues(kc client.Client, featureName string) (map[string]any, error)

func FeatureVersion added in v0.17.32

func FeatureVersion(kc client.Client, featureName string) string

func FluxCDHelmRepository added in v0.17.32

func FluxCDHelmRepository(kc client.Client) kmapi.TypedObjectReference

func GetBootstrapPresets added in v0.17.34

func GetBootstrapPresets(kc client.Client) (*shared.BootstrapPresets, bool)

func HelmCreateNamespace added in v0.18.4

func HelmCreateNamespace(kc client.Client) bool

func IsFeaturesetGK added in v0.18.4

func IsFeaturesetGK(gk schema.GroupKind) bool

func IsFeaturesetGR added in v0.18.4

func IsFeaturesetGR(gr schema.GroupResource) bool

func IsUnregisteredErr added in v0.9.0

func IsUnregisteredErr(err error) bool

func ParseGVR added in v0.17.26

func ParseGVR(name string) (*schema.GroupVersionResource, error)

Types

type KV

type KV interface {
	Set(key string, val *v1alpha1.ResourceDescriptor)
	Get(key string) (*v1alpha1.ResourceDescriptor, bool)
	Visit(func(key string, val *v1alpha1.ResourceDescriptor))
}

func NewKVLocal

func NewKVLocal() KV

func NewKVMap added in v0.17.27

func NewKVMap(cache map[string]*v1alpha1.ResourceDescriptor) KV

type KVLocal

type KVLocal struct {
	// contains filtered or unexported fields
}

KVLocal is not concurrent safe.

func (*KVLocal) Get

func (s *KVLocal) Get(key string) (*v1alpha1.ResourceDescriptor, bool)

func (*KVLocal) Set

func (s *KVLocal) Set(key string, val *v1alpha1.ResourceDescriptor)

func (*KVLocal) Visit

func (s *KVLocal) Visit(f func(key string, val *v1alpha1.ResourceDescriptor))

type KVMap

type KVMap struct {
	// contains filtered or unexported fields
}

KVMap is concurrent safe.

func (*KVMap) Get

func (s *KVMap) Get(key string) (*v1alpha1.ResourceDescriptor, bool)

func (*KVMap) Set

func (s *KVMap) Set(key string, val *v1alpha1.ResourceDescriptor)

func (*KVMap) Visit

func (s *KVMap) Visit(f func(key string, val *v1alpha1.ResourceDescriptor))

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

func MustPool

func MustPool(kvFactory func() KV) *Pool

func NewPool

func NewPool(kvFactory func() KV) (*Pool, error)

func (*Pool) GetRegistry

func (p *Pool) GetRegistry(uid string) *Registry

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry(uid string, cache KV) *Registry

func NewRegistryOfKnownResources

func NewRegistryOfKnownResources() *Registry

func (*Registry) DiscoverResources added in v0.3.3

func (r *Registry) DiscoverResources(cfg *rest.Config) error

func (*Registry) ExistsGVK added in v0.5.5

func (r *Registry) ExistsGVK(gvk schema.GroupVersionKind) (bool, error)

func (*Registry) ExistsGVR added in v0.5.5

func (r *Registry) ExistsGVR(gvr schema.GroupVersionResource) (bool, error)

func (*Registry) FindGVR added in v0.9.0

func (r *Registry) FindGVR(in *metav1.GroupKind, keepOfficialTypes bool) (schema.GroupVersionResource, bool)

func (*Registry) GVK

func (*Registry) GVR

func (*Registry) IsGVKNamespaced added in v0.8.0

func (r *Registry) IsGVKNamespaced(gvr schema.GroupVersionKind) (bool, error)

func (*Registry) IsGVRNamespaced added in v0.8.0

func (r *Registry) IsGVRNamespaced(gvr schema.GroupVersionResource) (bool, error)

func (*Registry) IsPreferred added in v0.5.3

func (r *Registry) IsPreferred(gvr schema.GroupVersionResource) (bool, error)

func (*Registry) Kinds added in v0.8.0

func (r *Registry) Kinds() []schema.GroupVersionKind

func (*Registry) LoadByFile

func (r *Registry) LoadByFile(filename string) (*v1alpha1.ResourceDescriptor, error)

func (*Registry) LoadByGVK added in v0.8.0

func (*Registry) LoadByGVR

func (*Registry) LoadByName

func (r *Registry) LoadByName(name string) (*v1alpha1.ResourceDescriptor, error)

func (*Registry) Missing added in v0.3.11

func (r *Registry) Missing(in schema.GroupVersionResource) bool

func (*Registry) Preferred added in v0.5.3

func (*Registry) Refresh added in v0.3.11

func (r *Registry) Refresh(cfg *rest.Config) error

func (*Registry) Register

func (r *Registry) Register(gvr schema.GroupVersionResource, cfg *rest.Config) error

func (*Registry) Reset added in v0.5.6

func (r *Registry) Reset()

func (*Registry) ResourceIDForGVK added in v0.5.6

func (r *Registry) ResourceIDForGVK(in schema.GroupVersionKind) (*kmapi.ResourceID, error)

func (*Registry) ResourceIDForGVR added in v0.5.6

func (r *Registry) ResourceIDForGVR(in schema.GroupVersionResource) (*kmapi.ResourceID, error)

func (*Registry) Resources

func (r *Registry) Resources() []schema.GroupVersionResource

func (*Registry) TypeMeta

func (*Registry) Visit

func (r *Registry) Visit(f func(key string, val *v1alpha1.ResourceDescriptor))

type UnregisteredErr

type UnregisteredErr struct {
	// contains filtered or unexported fields
}

func (UnregisteredErr) Error

func (e UnregisteredErr) Error() string

Jump to

Keyboard shortcuts

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