Documentation
¶
Overview ¶
Package gwadmin contains the controller deploying gw-admin, the on-prem control plane of the data planes that do not use Konnect, and managing its certificates.
Index ¶
Constants ¶
const ControllerName = "gwadmin"
ControllerName is the name of the GWAdmin controller.
const IndexFieldGWAdminOnSecret = "gwAdminSecret" //nolint:gosec
IndexFieldGWAdminOnSecret is the index field for GWAdmin -> Secret: the Secrets a GWAdmin references, and those it needs for itself.
const IndexFieldSecretLicenseInUse = "gwAdminLicenseInUse" //nolint:gosec
IndexFieldSecretLicenseInUse is the index field of the Secrets held by consts.GWAdminLicenseInUseFinalizer, which all index the value "true".
Variables ¶
This section is empty.
Functions ¶
func APICASecretName ¶
func APICASecretName(gw *operatorv1alpha1.GWAdmin) string
APICASecretName returns the name of the Secret, in the operator namespace, holding the API CA of the GWAdmin.
func CPServerCASecretName ¶
func CPServerCASecretName(gw *operatorv1alpha1.GWAdmin) string
CPServerCASecretName returns the name of the Secret, in the operator namespace, holding the cp server CA of the GWAdmin.
func IndexOptions ¶
IndexOptions returns the index options the GWAdmin controller needs.
Types ¶
type Reconciler ¶
type Reconciler struct {
client.Client
// LoggingMode controls the format of log output.
LoggingMode logging.Mode
// ClusterDomain is the cluster DNS domain, added to the names the server
// certificates are issued for.
ClusterDomain string
// SecretLabelSelector is the label the operator's Secret cache selects
// on; the Secrets of the GWAdmin carry it so the operator sees them.
SecretLabelSelector string
// OperatorNamespace is the namespace Kong Operator runs in. It holds the
// Secrets of the GWAdmins only Kong Operator uses: the keys of their
// certificate authorities and the operator client certificate.
OperatorNamespace string
// CATTL is the validity of the certificate authorities Kong Operator
// creates. Defaults to consts.GWAdminCATTL.
CATTL time.Duration
// CertTTL is the validity of the certificates Kong Operator issues.
// Defaults to consts.GWAdminLeafTTL.
CertTTL time.Duration
// TypeConverter is injected via the TypeConverterProvider at controller
// registration time. It is used for both diff-before-apply and
// structured-merge-diff based PodTemplateSpec merging.
TypeConverter managedfields.TypeConverter
// Now returns the current time. Defaults to time.Now.
Now func() time.Time
// contains filtered or unexported fields
}
Reconciler reconciles a GWAdmin object.
func (*Reconciler) Reconcile ¶
func (r *Reconciler) Reconcile(ctx context.Context, gw *operatorv1alpha1.GWAdmin) (res ctrl.Result, err error)
Reconcile moves the current state of a GWAdmin toward the desired state.
func (*Reconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.