Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the config v1alpha1 API group +kubebuilder:object:generate=true +groupName=addons.projectcapsule.dev
Index ¶
- Variables
- type ArgoAction
- type ArgoAddon
- type ArgoAddonList
- type ArgoAddonSpec
- func (in *ArgoAddonSpec) DeepCopy() *ArgoAddonSpec
- func (in *ArgoAddonSpec) DeepCopyInto(out *ArgoAddonSpec)
- func (in *ArgoAddonSpec) DestinationServiceAccount(tenant *capsulev1beta2.Tenant) string
- func (in *ArgoAddonSpec) ProxyServiceString(tenant *capsulev1beta2.Tenant) string
- func (in *ArgoAddonSpec) ServiceAccountNamespace(tenant *capsulev1beta2.Tenant) (namespace string)
- type ArgoAddonStatus
- type ArgoResource
- type ArgoTranslator
- func (in *ArgoTranslator) CollectStatus()
- func (in *ArgoTranslator) DeepCopy() *ArgoTranslator
- func (in *ArgoTranslator) DeepCopyInto(out *ArgoTranslator)
- func (in *ArgoTranslator) DeepCopyObject() runtime.Object
- func (in *ArgoTranslator) GetTenantCondition(tnt *capsulev1beta2.Tenant) *metav1.Condition
- func (in *ArgoTranslator) GetTenantNames() (tnts []string)
- func (in *ArgoTranslator) GetTenants() []TenantStatus
- func (in *ArgoTranslator) RemoveTenantCondition(tnt string)
- func (in *ArgoTranslator) UpdateTenantCondition(tnt TenantStatus)
- type ArgoTranslatorList
- type ArgoTranslatorSpec
- type ArgoTranslatorStatus
- type ArgoVerb
- type ArgocdPolicyDefinition
- type ArgocdProjectPropertieMeta
- type ArgocdProjectProperties
- func (in *ArgocdProjectProperties) DeepCopy() *ArgocdProjectProperties
- func (in *ArgocdProjectProperties) DeepCopyInto(out *ArgocdProjectProperties)
- func (t *ArgocdProjectProperties) GetConfig(data interface{}, funcmap template.FuncMap) (props ArgocdProjectStructuredProperties, err error)
- func (t *ArgocdProjectProperties) GetConfigs(data interface{}, funcmap template.FuncMap) (structured ArgocdProjectStructuredProperties, ...)
- func (t *ArgocdProjectProperties) RenderTemplate(data interface{}, funcmap template.FuncMap) (ArgocdProjectStructuredProperties, error)
- type ArgocdProjectRolesTranslator
- type ArgocdProjectStructuredProperties
- type ControllerArgoCDConfig
- type ControllerCapsuleProxyConfig
- type TenantStatus
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "addons.projectcapsule.dev", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type ArgoAction ¶
type ArgoAction string
Create enums for ArgoCD Permissions Actions
const ( ActionGet ArgoAction = "get" ActionCreate ArgoAction = "create" ActionUpdate ArgoAction = "update" ActionDelete ArgoAction = "delete" ActionSync ArgoAction = "sync" ActionAction ArgoAction = "action" ActionOverride ArgoAction = "override" ActionInvoke ArgoAction = "invoke" ActionWildcard ArgoAction = "*" )
type ArgoAddon ¶
type ArgoAddon struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ArgoAddonSpec `json:"spec,omitempty"` Status ArgoAddonStatus `json:"status,omitempty"` }
ArgoAddon is the Schema for the ArgoAddons API
func (*ArgoAddon) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgoAddon.
func (*ArgoAddon) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ArgoAddon) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ArgoAddonList ¶
type ArgoAddonList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ArgoAddon `json:"items"` }
ArgoAddonList contains a list of ArgoAddon
func (*ArgoAddonList) DeepCopy ¶
func (in *ArgoAddonList) DeepCopy() *ArgoAddonList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgoAddonList.
func (*ArgoAddonList) DeepCopyInto ¶
func (in *ArgoAddonList) DeepCopyInto(out *ArgoAddonList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ArgoAddonList) DeepCopyObject ¶
func (in *ArgoAddonList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ArgoAddonSpec ¶
type ArgoAddonSpec struct { // When force is enabled, approjects which already exist with the same name as a tenant will be adopted // and overwritten. When disabled the approjects will not be changed or adopted. // This is true for any other resource as well //+kubebuilder:default=false Force bool `json:"force"` // Capsule-Proxy configuration for the controller //+kubebuilder:default={} Proxy ControllerCapsuleProxyConfig `json:"proxy,omitempty"` // ArgoCD configuration Argo ControllerArgoCDConfig `json:"argo"` }
ArgoAddonSpec defines the desired state of ArgoAddon
func (*ArgoAddonSpec) DeepCopy ¶
func (in *ArgoAddonSpec) DeepCopy() *ArgoAddonSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgoAddonSpec.
func (*ArgoAddonSpec) DeepCopyInto ¶
func (in *ArgoAddonSpec) DeepCopyInto(out *ArgoAddonSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ArgoAddonSpec) DestinationServiceAccount ¶
func (in *ArgoAddonSpec) DestinationServiceAccount(tenant *capsulev1beta2.Tenant) string
Prints Argo Destination annotation
func (*ArgoAddonSpec) ProxyServiceString ¶
func (in *ArgoAddonSpec) ProxyServiceString(tenant *capsulev1beta2.Tenant) string
Assign Tenants to the ArgoTranslator
func (*ArgoAddonSpec) ServiceAccountNamespace ¶
func (in *ArgoAddonSpec) ServiceAccountNamespace(tenant *capsulev1beta2.Tenant) (namespace string)
Namespace where the serviceaccount will be placed
type ArgoAddonStatus ¶
type ArgoAddonStatus struct { // Last applied valid configuration Config ArgoAddonSpec `json:"loaded,omitempty"` }
ArgoAddonStatus defines the observed state of ArgoAddon
func (*ArgoAddonStatus) DeepCopy ¶
func (in *ArgoAddonStatus) DeepCopy() *ArgoAddonStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgoAddonStatus.
func (*ArgoAddonStatus) DeepCopyInto ¶
func (in *ArgoAddonStatus) DeepCopyInto(out *ArgoAddonStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ArgoResource ¶
type ArgoResource string
Create enums for ArgoCD Permissions Resources
const ( ResourceApplications ArgoResource = "applications" ResourceApplicationSets ArgoResource = "applicationsets" ResourceClusters ArgoResource = "clusters" ResourceProjects ArgoResource = "projects" ResourceRepositories ArgoResource = "repositories" ResourceAccounts ArgoResource = "accounts" ResourceCertificates ArgoResource = "certificates" ResourceGpgKeys ArgoResource = "gpgkeys" ResourceLogs ArgoResource = "logs" ResourceExec ArgoResource = "exec" ResourceExtensions ArgoResource = "extensions" ResourceWildcard ArgoResource = "*" )
type ArgoTranslator ¶
type ArgoTranslator struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ArgoTranslatorSpec `json:"spec,omitempty"` Status ArgoTranslatorStatus `json:"status,omitempty"` }
ArgoTranslator is the Schema for the argotranslators API
func (*ArgoTranslator) CollectStatus ¶
func (in *ArgoTranslator) CollectStatus()
Assign Tenants to the ArgoTranslator
func (*ArgoTranslator) DeepCopy ¶
func (in *ArgoTranslator) DeepCopy() *ArgoTranslator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgoTranslator.
func (*ArgoTranslator) DeepCopyInto ¶
func (in *ArgoTranslator) DeepCopyInto(out *ArgoTranslator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ArgoTranslator) DeepCopyObject ¶
func (in *ArgoTranslator) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ArgoTranslator) GetTenantCondition ¶
func (in *ArgoTranslator) GetTenantCondition(tnt *capsulev1beta2.Tenant) *metav1.Condition
Get Condition for a tenant, if no condition is present (tenant absent) returns nil
func (*ArgoTranslator) GetTenantNames ¶
func (in *ArgoTranslator) GetTenantNames() (tnts []string)
Just Extract the tenants
func (*ArgoTranslator) GetTenants ¶
func (in *ArgoTranslator) GetTenants() []TenantStatus
Assign Tenants to the ArgoTranslator
func (*ArgoTranslator) RemoveTenantCondition ¶
func (in *ArgoTranslator) RemoveTenantCondition(tnt string)
Removes a tenant from the ArgoTranslator Status
func (*ArgoTranslator) UpdateTenantCondition ¶
func (in *ArgoTranslator) UpdateTenantCondition(tnt TenantStatus)
Update the condition for a single Tenant
type ArgoTranslatorList ¶
type ArgoTranslatorList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ArgoTranslator `json:"items"` }
ArgoTranslatorList contains a list of ArgoTranslator
func (*ArgoTranslatorList) DeepCopy ¶
func (in *ArgoTranslatorList) DeepCopy() *ArgoTranslatorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgoTranslatorList.
func (*ArgoTranslatorList) DeepCopyInto ¶
func (in *ArgoTranslatorList) DeepCopyInto(out *ArgoTranslatorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ArgoTranslatorList) DeepCopyObject ¶
func (in *ArgoTranslatorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ArgoTranslatorSpec ¶
type ArgoTranslatorSpec struct { // Selector to match tenants which are used for the translator Selector *metav1.LabelSelector `json:"selector,omitempty"` // Application-Project Roles for the tenant //+kubebuilder:optional ProjectRoles []ArgocdProjectRolesTranslator `json:"roles,omitempty"` // Additional settings for the argocd project //+kubebuilder:optional ProjectSettings ArgocdProjectProperties `json:"settings,omitempty"` // In this field you can define custom policies. It must result in a valid argocd policy format (CSV) // You can use Sprig Templating with this field //+kubebuilder:optional CustomPolicy string `json:"customPolicy,omitempty"` }
ArgoTranslatorSpec defines the desired state of ArgoTranslator
func (*ArgoTranslatorSpec) DeepCopy ¶
func (in *ArgoTranslatorSpec) DeepCopy() *ArgoTranslatorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgoTranslatorSpec.
func (*ArgoTranslatorSpec) DeepCopyInto ¶
func (in *ArgoTranslatorSpec) DeepCopyInto(out *ArgoTranslatorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ArgoTranslatorStatus ¶
type ArgoTranslatorStatus struct { // List of tenants selected by this translator Tenants []TenantStatus `json:"tenants,omitempty"` // Amount of tenants selected by this translator Size uint `json:"size,omitempty"` // Ready field indicating overall readiness of the translator Ready string `json:"ready,omitempty"` }
ArgoTranslatorStatus defines the observed state of ArgoTranslator
func (*ArgoTranslatorStatus) DeepCopy ¶
func (in *ArgoTranslatorStatus) DeepCopy() *ArgoTranslatorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgoTranslatorStatus.
func (*ArgoTranslatorStatus) DeepCopyInto ¶
func (in *ArgoTranslatorStatus) DeepCopyInto(out *ArgoTranslatorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ArgocdPolicyDefinition ¶
type ArgocdPolicyDefinition struct { // Name for permission mapping Resource ArgoResource `json:"resource,omitempty"` // Allowed actions for this permission. You may specify multiple actions. To allow all actions use "*" // +kubebuilder:default={get} Action []string `json:"action,omitempty"` // Verb for this permission (can be allow, deny) // +kubebuilder:default=allow Verb ArgoVerb `json:"verb,omitempty"` // You may specify a custom path for the resource. The available path for argo is <app-project>/<app-ns>/<app-name> // however <app-project> is already set to the argocd project name. Therefor you can only add <app-ns>/<app-name> // +kubebuilder:default="*" Path string `json:"path,omitempty"` }
func (*ArgocdPolicyDefinition) DeepCopy ¶
func (in *ArgocdPolicyDefinition) DeepCopy() *ArgocdPolicyDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgocdPolicyDefinition.
func (*ArgocdPolicyDefinition) DeepCopyInto ¶
func (in *ArgocdPolicyDefinition) DeepCopyInto(out *ArgocdPolicyDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ArgocdProjectPropertieMeta ¶
type ArgocdProjectPropertieMeta struct { // Labels for the project //+kubebuilder:optional Labels map[string]string `json:"labels,omitempty"` // Annotations for the project //+kubebuilder:optional Annotations map[string]string `json:"annotations,omitempty"` // Finalizers for the project //+kubebuilder:optional Finalizers []string `json:"finalizers,omitempty"` }
func (*ArgocdProjectPropertieMeta) DeepCopy ¶
func (in *ArgocdProjectPropertieMeta) DeepCopy() *ArgocdProjectPropertieMeta
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgocdProjectPropertieMeta.
func (*ArgocdProjectPropertieMeta) DeepCopyInto ¶
func (in *ArgocdProjectPropertieMeta) DeepCopyInto(out *ArgocdProjectPropertieMeta)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ArgocdProjectProperties ¶
type ArgocdProjectProperties struct { // Structured Properties for the argocd project //+kubebuilder:optional Structured ArgocdProjectStructuredProperties `json:"structured,omitempty"` // Use a template to generate to argo project settings //+kubebuilder:optional Template string `json:"template,omitempty"` }
func (*ArgocdProjectProperties) DeepCopy ¶
func (in *ArgocdProjectProperties) DeepCopy() *ArgocdProjectProperties
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgocdProjectProperties.
func (*ArgocdProjectProperties) DeepCopyInto ¶
func (in *ArgocdProjectProperties) DeepCopyInto(out *ArgocdProjectProperties)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ArgocdProjectProperties) GetConfig ¶
func (t *ArgocdProjectProperties) GetConfig( data interface{}, funcmap template.FuncMap, ) (props ArgocdProjectStructuredProperties, err error)
Get Combined Configuration from structured and Template
func (*ArgocdProjectProperties) GetConfigs ¶
func (t *ArgocdProjectProperties) GetConfigs( data interface{}, funcmap template.FuncMap, ) (structured ArgocdProjectStructuredProperties, templated ArgocdProjectStructuredProperties, err error)
Get Combined Configuration from structured and Template
func (*ArgocdProjectProperties) RenderTemplate ¶
func (t *ArgocdProjectProperties) RenderTemplate( data interface{}, funcmap template.FuncMap, ) (ArgocdProjectStructuredProperties, error)
Field templating for the ArgoCD project properties. Needs to unmarshal in json, because of the json tags from argocd
type ArgocdProjectRolesTranslator ¶
type ArgocdProjectRolesTranslator struct { // Name for permission mapping Name string `json:"name,omitempty"` // TenantRoles selects tenant users based on their cluster roles to this Permission ClusterRoles []string `json:"clusterRoles,omitempty"` // Roles are reflected in the argocd rbac configmap Policies []ArgocdPolicyDefinition `json:"policies,omitempty"` // Define if the selected users are owners of the appproject. Being owner allows the users // to update the project and effectively manage everything. By default the selected users get // read-only access to the project. // +kubebuilder:default=false Owner bool `json:"owner,omitempty"` }
Define Permission mappings for an ArogCD Project
func (*ArgocdProjectRolesTranslator) DeepCopy ¶
func (in *ArgocdProjectRolesTranslator) DeepCopy() *ArgocdProjectRolesTranslator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgocdProjectRolesTranslator.
func (*ArgocdProjectRolesTranslator) DeepCopyInto ¶
func (in *ArgocdProjectRolesTranslator) DeepCopyInto(out *ArgocdProjectRolesTranslator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ArgocdProjectStructuredProperties ¶
type ArgocdProjectStructuredProperties struct { // Project Metadata //+kubebuilder:optional ProjectMeta ArgocdProjectPropertieMeta `json:"meta,omitempty"` // Application Project Spec (Upstream ArgoCD) //+kubebuilder:optional ProjectSpec argocdv1alpha1.AppProjectSpec `json:"spec,omitempty"` }
func (*ArgocdProjectStructuredProperties) DeepCopy ¶
func (in *ArgocdProjectStructuredProperties) DeepCopy() *ArgocdProjectStructuredProperties
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgocdProjectStructuredProperties.
func (*ArgocdProjectStructuredProperties) DeepCopyInto ¶
func (in *ArgocdProjectStructuredProperties) DeepCopyInto(out *ArgocdProjectStructuredProperties)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControllerArgoCDConfig ¶
type ControllerArgoCDConfig struct { // Namespace where the ArgoCD instance is running // +kubebuilder:default=argocd Namespace string `json:"namespace,omitempty"` // Name of the ArgoCD rbac configmap (required for the controller) // +kubebuilder:default=argocd-rbac-cm RBACConfigMap string `json:"rbacConfigMap,omitempty"` // If you are not using the capsule-proxy integration this destination is registered // for each appproject. // +kubebuilder:default="https://kubernetes.default.svc" Destination string `json:"destination,omitempty"` // This is a feature which will be released with argocd +v2.13.0 // If you are not yet on that version, you can't use this feature. Currently Feature is in state Alpha // +kubebuilder:default=false DestinationServiceAccounts bool `json:"destinationServiceAccounts,omitempty"` // Default Namespace to create ServiceAccounts used by arog-cd // The namespace must be part of capsuleUsers and have "list", "get" and "watch" privileges for the entire cluster // It's best to have a dedicated namespace for these serviceaccounts ServiceAccountNamespace string `json:"serviceAccountNamespace"` }
Controller Configuration for ArgoCD
func (*ControllerArgoCDConfig) DeepCopy ¶
func (in *ControllerArgoCDConfig) DeepCopy() *ControllerArgoCDConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerArgoCDConfig.
func (*ControllerArgoCDConfig) DeepCopyInto ¶
func (in *ControllerArgoCDConfig) DeepCopyInto(out *ControllerArgoCDConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControllerCapsuleProxyConfig ¶
type ControllerCapsuleProxyConfig struct { // Enable the capsule-proxy integration. // This automatically creates services for tenants and registers them as destination // on the argo appproject. // +kubebuilder:default=false Enabled bool `json:"enabled,omitempty"` // Name of the capsule-proxy service // +kubebuilder:default=capsule-proxy CapsuleProxyServiceName string `json:"serviceName,omitempty"` // Namespace where the capsule-proxy service is running // +kubebuilder:default=capsule-system CapsuleProxyServiceNamespace string `json:"serviceNamespace,omitempty"` // Port of the capsule-proxy service // +kubebuilder:default=9001 CapsuleProxyServicePort int32 `json:"servicePort,omitempty"` // Port of the capsule-proxy service // +kubebuilder:default=true CapsuleProxyTLS bool `json:"tls,omitempty"` }
Controller Configuration for ArgoCD
func (*ControllerCapsuleProxyConfig) DeepCopy ¶
func (in *ControllerCapsuleProxyConfig) DeepCopy() *ControllerCapsuleProxyConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerCapsuleProxyConfig.
func (*ControllerCapsuleProxyConfig) DeepCopyInto ¶
func (in *ControllerCapsuleProxyConfig) DeepCopyInto(out *ControllerCapsuleProxyConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TenantStatus ¶
type TenantStatus struct { // List of tenants selected by this translator Name string `json:"name,omitempty"` // UID of the tracked Tenant to pin point tracking k8stypes.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid"` // Conditions represent the latest available observations of an object's state Condition metav1.Condition `json:"condition,omitempty"` }
func (*TenantStatus) DeepCopy ¶
func (in *TenantStatus) DeepCopy() *TenantStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantStatus.
func (*TenantStatus) DeepCopyInto ¶
func (in *TenantStatus) DeepCopyInto(out *TenantStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.