Documentation
¶
Overview ¶
Copyright 2025 The canary-gate authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2025 The canary-gate authors ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type CanaryGateReconciler
- type DynamicEventSink
- type LogrAdapter
- func (a *LogrAdapter) Enabled(level int) bool
- func (a *LogrAdapter) Error(err error, msg string, keysAndValues ...interface{})
- func (a *LogrAdapter) Info(level int, msg string, keysAndValues ...interface{})
- func (a *LogrAdapter) Init(info logr.RuntimeInfo)
- func (a *LogrAdapter) WithName(name string) logr.LogSink
- func (a *LogrAdapter) WithValues(keysAndValues ...interface{}) logr.LogSink
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CanaryGateReconciler ¶
type CanaryGateReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder record.EventRecorder
}
CanaryGateReconciler reconciles a CanaryGate object
func (*CanaryGateReconciler) Reconcile ¶
func (r *CanaryGateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
+kubebuilder:rbac:groups=piggysec.com,resources=canarygates,verbs=get;list;watch;update;patch +kubebuilder:rbac:groups=piggysec.com,resources=canarygates/status,verbs=get;update;patch +kubebuilder:rbac:groups=piggysec.com,resources=canarygates/finalizers,verbs=update +kubebuilder:rbac:groups=flagger.app,resources=canaries,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups="",resources=events,verbs=create;patch
func (*CanaryGateReconciler) SetupWithManager ¶
func (r *CanaryGateReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type DynamicEventSink ¶
DynamicEventSink implements the record.EventSink interface using a dynamic client.
type LogrAdapter ¶
type LogrAdapter struct {
}
LogrAdapter implements the logr.LogSink interface.
func (*LogrAdapter) Enabled ¶
func (a *LogrAdapter) Enabled(level int) bool
Enabled returns true if the logger is enabled. We'll always enable it.
func (*LogrAdapter) Error ¶
func (a *LogrAdapter) Error(err error, msg string, keysAndValues ...interface{})
Error logs an error message.
func (*LogrAdapter) Info ¶
func (a *LogrAdapter) Info(level int, msg string, keysAndValues ...interface{})
Info logs an info message.
func (*LogrAdapter) Init ¶
func (a *LogrAdapter) Init(info logr.RuntimeInfo)
Init is called by logr.
func (*LogrAdapter) WithName ¶
func (a *LogrAdapter) WithName(name string) logr.LogSink
WithName returns a new logger with a name segment. We can ignore it.
func (*LogrAdapter) WithValues ¶
func (a *LogrAdapter) WithValues(keysAndValues ...interface{}) logr.LogSink
WithValues returns a new logger with additional key-value pairs.