Documentation
¶
Overview ¶
Package argocdregister provides a controller which ensures provisioned clusters are added to the ArgoCD cluster registry, and removed when the cluster is deprovisioned.
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- func AddToManager(mgr manager.Manager, r reconcile.Reconciler, concurrentReconciles int, ...) error
- func NewReconciler(mgr manager.Manager, logger log.FieldLogger, ...) reconcile.Reconciler
- type ArgoCDRegisterController
- type ClusterConfig
- type TLSClientConfig
Constants ¶
const (
ControllerName = "argocdregister"
)
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new Argocdregister Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.
func AddToManager ¶
func AddToManager(mgr manager.Manager, r reconcile.Reconciler, concurrentReconciles int, rateLimiter workqueue.RateLimiter) error
AddToManager adds a new Controller to mgr with r as the reconcile.Reconciler
func NewReconciler ¶
func NewReconciler(mgr manager.Manager, logger log.FieldLogger, rateLimiter flowcontrol.RateLimiter) reconcile.Reconciler
NewReconciler returns a new reconcile.Reconciler
Types ¶
type ArgoCDRegisterController ¶
ArgoCDRegisterController reconciles ClusterDeployments and generates ArgoCD cluster secrets for ClusterDeployments
func (*ArgoCDRegisterController) Reconcile ¶
func (r *ArgoCDRegisterController) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile checks if we can establish an API client connection to the remote cluster and maintains the unreachable condition as a result.
type ClusterConfig ¶
type ClusterConfig struct {
// Server requires Basic authentication
Username string `json:"username,omitempty" protobuf:"bytes,1,opt,name=username"`
Password string `json:"password,omitempty" protobuf:"bytes,2,opt,name=password"`
// Server requires Bearer authentication. This client will not attempt to use
// refresh tokens for an OAuth2 flow.
// TODO: demonstrate an OAuth2 compatible client.
BearerToken string `json:"bearerToken,omitempty" protobuf:"bytes,3,opt,name=bearerToken"`
// TLSClientConfig contains settings to enable transport layer security
TLSClientConfig `json:"tlsClientConfig" protobuf:"bytes,4,opt,name=tlsClientConfig"`
}
ClusterConfig is the configuration attributes. This structure is subset of the go-client rest.Config with annotations added for marshalling.
type TLSClientConfig ¶
type TLSClientConfig struct {
// Server should be accessed without verifying the TLS certificate. For testing only.
Insecure bool `json:"insecure" protobuf:"bytes,1,opt,name=insecure"`
// ServerName is passed to the server for SNI and is used in the client to check server
// certificates against. If ServerName is empty, the hostname used to contact the
// server is used.
ServerName string `json:"serverName,omitempty" protobuf:"bytes,2,opt,name=serverName"`
// CertData holds PEM-encoded bytes (typically read from a client certificate file).
// CertData takes precedence over CertFile
CertData []byte `json:"certData,omitempty" protobuf:"bytes,3,opt,name=certData"`
// KeyData holds PEM-encoded bytes (typically read from a client certificate key file).
// KeyData takes precedence over KeyFile
KeyData []byte `json:"keyData,omitempty" protobuf:"bytes,4,opt,name=keyData"`
// CAData holds PEM-encoded bytes (typically read from a root certificates bundle).
// CAData takes precedence over CAFile
CAData []byte `json:"caData,omitempty" protobuf:"bytes,5,opt,name=caData"`
}
TLSClientConfig contains settings to enable transport layer security