Documentation
¶
Overview ¶
* Copyright (c) 2022, Nadun De Silva. All Rights Reserved. * 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 (c) 2022, Nadun De Silva. All Rights Reserved. * 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 (c) 2022, Nadun De Silva. All Rights Reserved. * 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 ¶
Constants ¶
const ( NamespaceTypeLabelKey = "replicator.nadundesilva.github.io/namespace-type" NamespaceTypeLabelValueManaged = "managed" NamespaceTypeLabelValueIgnored = "ignored" )
const ( ObjectTypeLabelKey = "replicator.nadundesilva.github.io/object-type" SourceNamespaceAnnotationKey = "replicator.nadundesilva.github.io/source-namespace" SourceResourceVersionAnnotationKey = "replicator.nadundesilva.github.io/source-resource-version" ObjectTypeLabelValueSource = "source" ObjectTypeLabelValueReplica = "replica" )
Variables ¶
This section is empty.
Functions ¶
func NewController ¶
func NewController(resourceReplicators []resources.ResourceReplicator, k8sClient kubernetes.ClientInterface, logger *zap.SugaredLogger) *controller
Types ¶
type ResourceEventHandler ¶
type ResourceEventHandler struct {
// contains filtered or unexported fields
}
func NewResourcesEventHandler ¶
func NewResourcesEventHandler(replicator resources.ResourceReplicator, k8sClient kubernetes.ClientInterface, logger *zap.SugaredLogger) *ResourceEventHandler
func (*ResourceEventHandler) OnAdd ¶
func (h *ResourceEventHandler) OnAdd(newObj interface{})
func (*ResourceEventHandler) OnDelete ¶
func (h *ResourceEventHandler) OnDelete(obj interface{})
func (*ResourceEventHandler) OnUpdate ¶
func (h *ResourceEventHandler) OnUpdate(oldObj, newObj interface{})