Documentation ¶
Index ¶
- Constants
- Variables
- func EncodeNS(decoded string) string
- func GetContext(ctx context.Context, ns string, client client.Client, target *model.Target, ...) (*v1alpha1.OperatorContext, error)
- func HttpContext(ctx context.Context, rClient client.Client, env *environment.Env, ...) (environment.Env, context.Context, error)
- type APIDescriptionReconciler
- type ApiDefinitionReconciler
- type IngressReconciler
- type NewSecretType
- type OperatorContextReconciler
- type PortalAPICatalogueReconciler
- type PortalConfigReconciler
- type SecretCertReconciler
- type SecurityPolicyReconciler
- type SubGraphReconciler
- type SuperGraphReconciler
Constants ¶
const (
GraphKey = "graph_ref"
)
const SubgraphField = ".subgraphs_refs.name"
const (
TLSSecretType = "kubernetes.io/tls"
)
Variables ¶
var ( ErrSubgrapReferenceExistsInGraph = errors.New("subgraph is referenced in SuperGraph") ErrSubgrapReferenceExistsInApiDef = errors.New("subgraph is referenced in ApiDefinition") )
var ErrMultipleLinkSubGraph = errors.New("linking one SubGraph to multiple ApiDefinition is forbidden")
var ErrOperatorContextIsStillInUse = errors. New("Operator context is used by other resources." + "Please check operator context status to find exact list of resources")
var ErrSuperGraphReference = errors.New("SuperGraph is referenced in ApiDefinition")
Functions ¶
func GetContext ¶ added in v0.7.0
func GetContext( ctx context.Context, ns string, client client.Client, target *model.Target, log logr.Logger, ) (*v1alpha1.OperatorContext, error)
GetContext returns a OperatorContext resource from k8s cluster with namespace/name derived from target. When Spec.FromSecret is provided this reads the secret and loads the environment from it. Values set in .Spec.Env takes precedence over the values from secret
Types ¶
type APIDescriptionReconciler ¶ added in v0.7.0
type APIDescriptionReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Universal universal.Client Env environment.Env }
APIDescriptionReconciler reconciles a APIDescription object
func (*APIDescriptionReconciler) Reconcile ¶ added in v0.7.0
func (r *APIDescriptionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*APIDescriptionReconciler) SetupWithManager ¶ added in v0.7.0
func (r *APIDescriptionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ApiDefinitionReconciler ¶
type ApiDefinitionReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Env environment.Env Recorder record.EventRecorder }
ApiDefinitionReconciler reconciles a ApiDefinition object
func (*ApiDefinitionReconciler) SetupWithManager ¶
func (r *ApiDefinitionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager initializes the api definition controller.
type IngressReconciler ¶
type IngressReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Env environment.Env Recorder record.EventRecorder }
IngressReconciler watches and reconciles Ingress objects
func (*IngressReconciler) Reconcile ¶
Reconcile perform reconciliation logic for Ingress resource that is managed by the operator.
func (*IngressReconciler) SetupWithManager ¶
func (r *IngressReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager initializes ingress controller manager
type NewSecretType ¶ added in v0.9.0
type NewSecretType struct { ObjectOld struct { Type string `json:"type"` } `json:"ObjectOld"` ObjectNew struct { Type string `json:"type"` } `json:"ObjectNew"` Object struct { Type string `json:"type"` } `json:"Object"` }
NewSecretType represents a structure for new Kubernetes Secret Object.
type OperatorContextReconciler ¶ added in v0.8.2
OperatorContextReconciler reconciles a OperatorContext object
func (*OperatorContextReconciler) Reconcile ¶ added in v0.8.2
func (r *OperatorContextReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the OperatorContext object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
func (*OperatorContextReconciler) SetupWithManager ¶ added in v0.8.2
func (r *OperatorContextReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type PortalAPICatalogueReconciler ¶ added in v0.7.0
type PortalAPICatalogueReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Env environment.Env }
PortalAPICatalogueReconciler reconciles a PortalAPICatalogue object
func (*PortalAPICatalogueReconciler) Reconcile ¶ added in v0.7.0
func (r *PortalAPICatalogueReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the PortalAPICatalogue object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
func (*PortalAPICatalogueReconciler) SetupWithManager ¶ added in v0.7.0
func (r *PortalAPICatalogueReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type PortalConfigReconciler ¶ added in v0.7.0
type PortalConfigReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Env environment.Env }
PortalConfigReconciler reconciles a PortalConfig object
func (*PortalConfigReconciler) Reconcile ¶ added in v0.7.0
func (r *PortalConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request, ) (result ctrl.Result, err error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the PortalConfig object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
func (*PortalConfigReconciler) SetupWithManager ¶ added in v0.7.0
func (r *PortalConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SecretCertReconciler ¶
type SecretCertReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Env environment.Env }
SecretCertReconciler reconciles a Cert object
func (*SecretCertReconciler) SetupWithManager ¶
func (r *SecretCertReconciler) SetupWithManager(mgr ctrl.Manager) error
type SecurityPolicyReconciler ¶
type SecurityPolicyReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Env environment.Env Recorder record.EventRecorder }
SecurityPolicyReconciler reconciles a SecurityPolicy object
func (*SecurityPolicyReconciler) Reconcile ¶
func (r *SecurityPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile reconciles SecurityPolicy custom resources
func (*SecurityPolicyReconciler) SetupWithManager ¶
func (r *SecurityPolicyReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager initializes the security policy controller.
type SubGraphReconciler ¶ added in v0.10.0
type SubGraphReconciler struct { client.Client Log logr.Logger Env environment.Env Scheme *runtime.Scheme }
SubGraphReconciler reconciles a SubGraph object
func (*SubGraphReconciler) Reconcile ¶ added in v0.10.0
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.10.0/pkg/reconcile
func (*SubGraphReconciler) SetupWithManager ¶ added in v0.10.0
func (r *SubGraphReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SuperGraphReconciler ¶ added in v0.10.0
type SuperGraphReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Env environment.Env }
SuperGraphReconciler reconciles a SuperGraph object
func (*SuperGraphReconciler) Reconcile ¶ added in v0.10.0
func (r *SuperGraphReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.10.0/pkg/reconcile
func (*SuperGraphReconciler) SetupWithManager ¶ added in v0.10.0
func (r *SuperGraphReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.