Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PackageDeployerBindingReconciler ¶
type PackageDeployerBindingReconciler struct {
Client client.Client
Log logr.Logger
// ClusterRole is the name of the ClusterRole to bind.
ClusterRole string
}
PackageDeployerBindingReconciler converges the ClusterRoleBinding that grants a Package's ServiceAccount what its kapp App may deploy.
The rights themselves are not decided here. They are one ClusterRole, shipped with the installation, and this binds each Package's ServiceAccount to it.
func NewPackageDeployerBindingReconciler ¶
func NewPackageDeployerBindingReconciler( c client.Client, log logr.Logger, clusterRole string, ) *PackageDeployerBindingReconciler
NewPackageDeployerBindingReconciler constructs a PackageDeployerBindingReconciler binding to the named ClusterRole.
func (*PackageDeployerBindingReconciler) Delete ¶
func (r *PackageDeployerBindingReconciler) Delete( ctx context.Context, pkg *packageResolution.ResolvedPackage, ) error
Delete removes the ClusterRoleBinding created for the Package. Idempotent — a missing ClusterRoleBinding is not an error.
func (*PackageDeployerBindingReconciler) Reconcile ¶
func (r *PackageDeployerBindingReconciler) Reconcile( ctx context.Context, pkg *packageResolution.ResolvedPackage, ) error
Reconcile ensures the ClusterRoleBinding exists for the Package's ServiceAccount.
RULES: - The binding has exactly one subject, the Package's ServiceAccount - It is cluster-scoped, so the Package cannot own it; Delete removes it - A binding to another role is replaced: roleRef cannot be updated
type PackageServiceAccountReconciler ¶
type PackageServiceAccountReconciler struct {
Client client.Client
Scheme *runtime.Scheme
Log logr.Logger
}
PackageServiceAccountReconciler converges the ServiceAccount a Package's kapp App deploys as.
func NewPackageServiceAccountReconciler ¶
func NewPackageServiceAccountReconciler( c client.Client, scheme *runtime.Scheme, log logr.Logger, ) *PackageServiceAccountReconciler
NewPackageServiceAccountReconciler constructs a PackageServiceAccountReconciler.
func (*PackageServiceAccountReconciler) Delete ¶
func (r *PackageServiceAccountReconciler) Delete( ctx context.Context, pkg *packageResolution.ResolvedPackage, ) error
Delete removes the ServiceAccount created for the Package's kapp App. Mirrors the name-resolution logic in Reconcile so it targets the same object. Idempotent — a missing ServiceAccount is not an error.
func (*PackageServiceAccountReconciler) Reconcile ¶
func (r *PackageServiceAccountReconciler) Reconcile( ctx context.Context, pkg *packageResolution.ResolvedPackage, ) error
Reconcile ensures the ServiceAccount exists for the Package's kapp App.
RULES: - ServiceAccount is ALWAYS created - Its name is derived from the Package, the same way the App names it - It grants nothing by itself; what it may deploy is bound to it separately
type ServiceAccountReconciler ¶
type ServiceAccountReconciler struct {
Client client.Client
Scheme *runtime.Scheme
Log logr.Logger
}
ServiceAccountReconciler converges the ServiceAccount a Build's execution runs as.
func NewServiceAccountReconciler ¶
func NewServiceAccountReconciler( c client.Client, scheme *runtime.Scheme, log logr.Logger, ) *ServiceAccountReconciler
NewServiceAccountReconciler constructs a ServiceAccountReconciler.
func (*ServiceAccountReconciler) Delete ¶
func (r *ServiceAccountReconciler) Delete( ctx context.Context, build *buildResolution.ResolvedBuild, ) error
Delete removes the ServiceAccount created for the Build execution. Mirrors the name-resolution logic in Reconcile so it targets the same object. Idempotent — a missing ServiceAccount is not an error.
func (*ServiceAccountReconciler) Reconcile ¶
func (r *ServiceAccountReconciler) Reconcile( ctx context.Context, build *buildResolution.ResolvedBuild, ) error
Reconcile ensures a ServiceAccount exists for the Build execution.
RULES: - ServiceAccount is ALWAYS created - Contract values are honored when provided - Defaults are generated when omitted