Documentation ¶
Index ¶
- Constants
- Variables
- func GetTenant(namespace, clusterName string, clusterUserNamespaces map[string][]v1.Namespace) string
- func Hydrate(ctx context.Context, mux *runtime.ServeMux, cfg CoreServerConfig) error
- func NewCoreServer(cfg CoreServerConfig) (pb.CoreServer, error)
- type CoreServerConfig
- type PodLog
- type PrimaryKinds
Constants ¶
View Source
const (
FluxNamespacePartOf = "flux"
)
Variables ¶
View Source
var ( KustomizeNameKey = fmt.Sprintf("%s/name", kustomizev1.GroupVersion.Group) KustomizeNamespaceKey = fmt.Sprintf("%s/namespace", kustomizev1.GroupVersion.Group) HelmNameKey = fmt.Sprintf("%s/name", helmv2.GroupVersion.Group) HelmNamespaceKey = fmt.Sprintf("%s/namespace", helmv2.GroupVersion.Group) // ErrFluxNamespaceNotFound no flux namespace found ErrFluxNamespaceNotFound = errors.New("could not find flux namespace in cluster") // ErrListingDeployments no deployments found ErrListingDeployments = errors.New("could not list deployments in namespace") DefaultFluxNamespace = lookupEnv("WEAVE_GITOPS_FALLBACK_NAMESPACE", "flux-system") )
View Source
var ( Version = "v0.0.0" GitCommit = "" Branch = "" Buildtime = "" )
Variables that we'll set @ build time
Functions ¶
func NewCoreServer ¶
func NewCoreServer(cfg CoreServerConfig) (pb.CoreServer, error)
Types ¶
type CoreServerConfig ¶
type CoreServerConfig struct { RestCfg *rest.Config NSAccess nsaccess.Checker ClustersManager clustersmngr.ClustersManager PrimaryKinds *PrimaryKinds CRDService crd.Fetcher // contains filtered or unexported fields }
func NewCoreConfig ¶
func NewCoreConfig(log logr.Logger, cfg *rest.Config, clusterName string, clustersManager clustersmngr.ClustersManager) (CoreServerConfig, error)
type PodLog ¶ added in v0.17.0
type PodLog struct { Date time.Time `json:"date"` Time time.Time `json:"time"` Log string `json:"log"` Msg string `json:"msg"` Level string `json:"level"` Kubernetes struct { PodName string `json:"pod_name"` NamespaceName string `json:"namespace_name"` PodID string `json:"pod_id"` Labels map[string]string `json:"labels"` Annotations map[string]string `json:"annotations"` Host string `json:"host"` ContainerName string `json:"container_name"` DockerID string `json:"docker_id"` ContainerHash string `json:"container_hash"` ContainerImage string `json:"container_image"` } `json:"kubernetes"` }
type PrimaryKinds ¶ added in v0.9.1
type PrimaryKinds struct {
// contains filtered or unexported fields
}
func DefaultPrimaryKinds ¶ added in v0.9.1
func DefaultPrimaryKinds() (*PrimaryKinds, error)
func New ¶ added in v0.9.1
func New() *PrimaryKinds
func (*PrimaryKinds) Add ¶ added in v0.9.1
func (pk *PrimaryKinds) Add(kind string, gvk schema.GroupVersionKind) error
Add sets another kind name and gvk to resolve an object This errors if the kind is already set, as this likely indicates 2 different uses for the same kind string.
func (*PrimaryKinds) Lookup ¶ added in v0.9.1
func (pk *PrimaryKinds) Lookup(kind string) (*schema.GroupVersionKind, error)
Lookup ensures that a kind name is known, white-listed, and returns the full GVK for that kind
Source Files ¶
Click to show internal directories.
Click to hide internal directories.