Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creates CRD for OpAMPBridge resource #1559

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
ff76304
creates CRD for OpAMPBridge resource
avadhut123pisal Mar 7, 2023
506292c
minor changes
avadhut123pisal Mar 7, 2023
2be7eae
fixes kustomization.yaml issues
avadhut123pisal Mar 7, 2023
3b5edf0
adds age field to status
avadhut123pisal Mar 7, 2023
9137c1d
fixes lint issues
avadhut123pisal Mar 7, 2023
e3a7232
fixes lint issues
avadhut123pisal Mar 7, 2023
016b7d7
fixes lint issues
avadhut123pisal Mar 7, 2023
d05a3e6
fixes lint issues
avadhut123pisal Mar 7, 2023
fbed725
fix ci issues
avadhut123pisal Mar 8, 2023
a937f57
updates bundle
avadhut123pisal Mar 8, 2023
cb06632
fixes webhook test issue
avadhut123pisal Mar 9, 2023
d7cd81a
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Mar 9, 2023
d01898a
updates bundle
avadhut123pisal Mar 9, 2023
bc888c8
resolves merge conflicts
avadhut123pisal Mar 11, 2023
099f6cd
updates bundle
avadhut123pisal Mar 11, 2023
5b21c4f
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Apr 5, 2023
439f9bc
adds enum for opamp-bridge capabilities
avadhut123pisal Apr 5, 2023
c4f4d2f
fix opamp server endpoint in e2e test case
avadhut123pisal Apr 6, 2023
4ddbace
fix e2e test case
avadhut123pisal Apr 6, 2023
d25e3ae
fix e2e test case
avadhut123pisal Apr 6, 2023
4dcc78f
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Apr 7, 2023
f0f3b63
validate maximum replica count
avadhut123pisal Apr 7, 2023
57b1987
add delete verb to webhook
avadhut123pisal Apr 8, 2023
195d75b
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Apr 15, 2023
c55da4f
code refactoring to move reconciliation implementation in separate pa…
avadhut123pisal Apr 15, 2023
da61d39
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Apr 27, 2023
ce6cde4
resolves merge conflicts
avadhut123pisal Sep 23, 2023
4612f17
resolves merge conflicts
avadhut123pisal Sep 23, 2023
f092b71
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Sep 23, 2023
463c918
using common reconciliation implementation for opampbridge
avadhut123pisal Oct 1, 2023
874214e
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Oct 1, 2023
88e74ec
add test cases
avadhut123pisal Oct 2, 2023
5cf30e3
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Oct 2, 2023
b0e0973
resolves goimports lint issues
avadhut123pisal Oct 2, 2023
6576821
resolves merge conflicts
avadhut123pisal Oct 3, 2023
721f0d2
add validations for capabilities
avadhut123pisal Oct 4, 2023
119de28
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Oct 4, 2023
b8a2498
removes validation on specific set of capabilities
avadhut123pisal Oct 4, 2023
f5eb413
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Oct 4, 2023
c0234e5
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Oct 11, 2023
135258d
change capabilities data type to map
avadhut123pisal Oct 13, 2023
72ef9fe
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Oct 13, 2023
f38592f
defaulting required capabilities
avadhut123pisal Oct 13, 2023
672fbbe
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Oct 13, 2023
f71b489
add local e2e image entry for opampbridge in hack
avadhut123pisal Oct 13, 2023
4795614
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Oct 13, 2023
b3145bf
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Oct 13, 2023
610d0c4
add OPERATOROPAMPBRIDGE_IMG to prepare-e2e
avadhut123pisal Oct 13, 2023
e5752db
Merge branch 'main' into 1368-create-operator-bridge-crd-in-operator
avadhut123pisal Oct 13, 2023
78b693e
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Oct 17, 2023
3c37765
Merge branch '1368-create-operator-bridge-crd-in-operator' of github.…
avadhut123pisal Oct 17, 2023
da40730
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Oct 20, 2023
6c989eb
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Oct 20, 2023
46950cd
fix review comments
avadhut123pisal Oct 20, 2023
35a713f
fix e2e hack
avadhut123pisal Oct 20, 2023
1804a3f
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Oct 24, 2023
cab0e6d
add e2e test-suit to github action
avadhut123pisal Oct 25, 2023
c9e28db
Merge branch 'main' of github.com:avadhut123pisal/opentelemetry-opera…
avadhut123pisal Oct 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .chloggen/1368-create-operator-bridge-crd-in-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: 'enhancement'

# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
component: operator-opamp-bridge

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Creates the CRD for the OpAMPBridge resource"

# One or more tracking issues related to the change
issues: [1368]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
1 change: 1 addition & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- e2e-autoscale
- e2e-multi-instrumentation
- e2e-pdb
- e2e-opampbridge

steps:
- name: Set up Go
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,14 @@ e2e-log-operator:
e2e-multi-instrumentation:
$(KUTTL) test --config kuttl-test-multi-instr.yaml

# OpAMPBridge CR end-to-tests
.PHONY: e2e-opampbridge
e2e-opampbridge:
$(KUTTL) test --config kuttl-test-opampbridge.yaml

.PHONY: prepare-e2e
prepare-e2e: kuttl set-image-controller container container-target-allocator container-operator-opamp-bridge start-kind cert-manager install-metrics-server load-image-all deploy
TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) OPERATOR_IMG=$(IMG) SED_BIN="$(SED)" ./hack/modify-test-images.sh
TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) OPERATOROPAMPBRIDGE_IMG=$(OPERATOROPAMPBRIDGE_IMG) OPERATOR_IMG=$(IMG) SED_BIN="$(SED)" ./hack/modify-test-images.sh

.PHONY: enable-prometheus-feature-flag
enable-prometheus-feature-flag:
Expand Down
12 changes: 12 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,16 @@ resources:
webhooks:
defaulting: true
webhookVersion: v1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: opentelemetry.io
kind: OpAMPBridge
path: github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1
version: v1alpha1
webhooks:
defaulting: true
validation: true
webhookVersion: v1
version: "3"
35 changes: 35 additions & 0 deletions apis/v1alpha1/opampbridge_capabilities.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright The OpenTelemetry 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.

package v1alpha1

type (
// OpAMPBridgeCapability represents capability supported by OpAMP Bridge.
// +kubebuilder:validation:Enum=AcceptsRemoteConfig;ReportsEffectiveConfig;ReportsOwnTraces;ReportsOwnMetrics;ReportsOwnLogs;AcceptsOpAMPConnectionSettings;AcceptsOtherConnectionSettings;AcceptsRestartCommand;ReportsHealth;ReportsRemoteConfig
OpAMPBridgeCapability string
avadhut123pisal marked this conversation as resolved.
Show resolved Hide resolved
)

const (
OpAMPBridgeCapabilityReportsStatus OpAMPBridgeCapability = "ReportsStatus"
OpAMPBridgeCapabilityAcceptsRemoteConfig OpAMPBridgeCapability = "AcceptsRemoteConfig"
OpAMPBridgeCapabilityReportsEffectiveConfig OpAMPBridgeCapability = "ReportsEffectiveConfig"
OpAMPBridgeCapabilityReportsOwnTraces OpAMPBridgeCapability = "ReportsOwnTraces"
OpAMPBridgeCapabilityReportsOwnMetrics OpAMPBridgeCapability = "ReportsOwnMetrics"
OpAMPBridgeCapabilityReportsOwnLogs OpAMPBridgeCapability = "ReportsOwnLogs"
OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings OpAMPBridgeCapability = "AcceptsOpAMPConnectionSettings"
OpAMPBridgeCapabilityAcceptsOtherConnectionSettings OpAMPBridgeCapability = "AcceptsOtherConnectionSettings"
OpAMPBridgeCapabilityAcceptsRestartCommand OpAMPBridgeCapability = "AcceptsRestartCommand"
OpAMPBridgeCapabilityReportsHealth OpAMPBridgeCapability = "ReportsHealth"
OpAMPBridgeCapabilityReportsRemoteConfig OpAMPBridgeCapability = "ReportsRemoteConfig"
avadhut123pisal marked this conversation as resolved.
Show resolved Hide resolved
)
141 changes: 141 additions & 0 deletions apis/v1alpha1/opampbridge_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
// Copyright The OpenTelemetry 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.

package v1alpha1

import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// OpAMPBridgeSpec defines the desired state of OpAMPBridge.
type OpAMPBridgeSpec struct {
// OpAMP backend Server endpoint
// +required
Endpoint string `json:"endpoint"`
// Capabilities supported by the OpAMP Bridge
// +required
Capabilities map[OpAMPBridgeCapability]bool `json:"capabilities"`
// ComponentsAllowed is a list of allowed OpenTelemetry components for each pipeline type (receiver, processor, etc.)
// +optional
ComponentsAllowed map[string][]string `json:"componentsAllowed,omitempty"`
// Resources to set on the OpAMPBridge pods.
// +optional
Resources v1.ResourceRequirements `json:"resources,omitempty"`
// NodeSelector to schedule OpAMPBridge pods.
// +optional
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// Replicas is the number of pod instances for the OpAMPBridge.
// +optional
// +kubebuilder:validation:Maximum=1
Replicas *int32 `json:"replicas,omitempty"`
avadhut123pisal marked this conversation as resolved.
Show resolved Hide resolved
// SecurityContext will be set as the container security context.
// +optional
SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"`
// PodSecurityContext will be set as the pod security context.
// +optional
PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"`
// PodAnnotations is the set of annotations that will be attached to
// OpAMPBridge pods.
// +optional
PodAnnotations map[string]string `json:"podAnnotations,omitempty"`
// ServiceAccount indicates the name of an existing service account to use with this instance. When set,
// the operator will not automatically create a ServiceAccount for the OpAMPBridge.
// +optional
ServiceAccount string `json:"serviceAccount,omitempty"`
// Image indicates the container image to use for the OpAMPBridge.
// +optional
Image string `json:"image,omitempty"`
// UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed
// +optional
UpgradeStrategy UpgradeStrategy `json:"upgradeStrategy"`
// ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent)
// +optional
ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"`
// VolumeMounts represents the mount points to use in the underlying OpAMPBridge deployment(s)
// +optional
// +listType=atomic
VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`
// Ports allows a set of ports to be exposed by the underlying v1.Service.
// +optional
// +listType=atomic
Ports []v1.ServicePort `json:"ports,omitempty"`
// ENV vars to set on the OpAMPBridge Pods.
// +optional
Env []v1.EnvVar `json:"env,omitempty"`
// List of sources to populate environment variables on the OpAMPBridge Pods.
// +optional
EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty"`
// Toleration to schedule OpAMPBridge pods.
// +optional
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
// Volumes represents which volumes to use in the underlying OpAMPBridge deployment(s).
// +optional
// +listType=atomic
Volumes []v1.Volume `json:"volumes,omitempty"`
// HostNetwork indicates if the pod should run in the host networking namespace.
// +optional
HostNetwork bool `json:"hostNetwork,omitempty"`
// If specified, indicates the pod's priority.
// If not specified, the pod priority will be default or zero if there is no
// default.
// +optional
PriorityClassName string `json:"priorityClassName,omitempty"`
// If specified, indicates the pod's scheduling constraints
// +optional
Affinity *v1.Affinity `json:"affinity,omitempty"`
// TopologySpreadConstraints embedded kubernetes pod configuration option,
// controls how pods are spread across your cluster among failure-domains
// such as regions, zones, nodes, and other user-defined topology domains
// https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
// +optional
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
}

// OpAMPBridgeStatus defines the observed state of OpAMPBridge.
type OpAMPBridgeStatus struct {
// Version of the managed OpAMP Bridge (operand)
// +optional
Version string `json:"version,omitempty"`
avadhut123pisal marked this conversation as resolved.
Show resolved Hide resolved
}

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="OpenTelemetry Version"
// +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".spec.endpoint"
// +operator-sdk:csv:customresourcedefinitions:displayName="OpAMP Bridge"
// +operator-sdk:csv:customresourcedefinitions:resources={{Pod,v1},{Deployment,apps/v1},{ConfigMaps,v1},{Service,v1}}

// OpAMPBridge is the Schema for the opampbridges API.
type OpAMPBridge struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec OpAMPBridgeSpec `json:"spec,omitempty"`
Status OpAMPBridgeStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// OpAMPBridgeList contains a list of OpAMPBridge.
type OpAMPBridgeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []OpAMPBridge `json:"items"`
}

func init() {
SchemeBuilder.Register(&OpAMPBridge{}, &OpAMPBridgeList{})
}
120 changes: 120 additions & 0 deletions apis/v1alpha1/opampbridge_webhook.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
// Copyright The OpenTelemetry 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.

package v1alpha1

import (
"fmt"
"strings"

"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/validation"
ctrl "sigs.k8s.io/controller-runtime"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)

// log is for logging in this package.
var opampbridgelog = logf.Log.WithName("opampbridge-resource")

func (r *OpAMPBridge) SetupWebhookWithManager(mgr ctrl.Manager) error {
return ctrl.NewWebhookManagedBy(mgr).
For(r).
Complete()
}

//+kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-opampbridge,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=create;update,versions=v1alpha1,name=mopampbridge.kb.io,admissionReviewVersions=v1

var _ webhook.Defaulter = &OpAMPBridge{}

// Default implements webhook.Defaulter so a webhook will be registered for the type.
func (r *OpAMPBridge) Default() {
opampbridgelog.Info("default", "name", r.Name)
if len(r.Spec.UpgradeStrategy) == 0 {
r.Spec.UpgradeStrategy = UpgradeStrategyAutomatic
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should add the default report status to capabilities.

if r.Labels == nil {
r.Labels = map[string]string{}
}
if r.Labels["app.kubernetes.io/managed-by"] == "" {
r.Labels["app.kubernetes.io/managed-by"] = "opentelemetry-operator"
}

one := int32(1)
if r.Spec.Replicas == nil {
r.Spec.Replicas = &one
}

// ReportsStatus Capability must be set
if r.Spec.Capabilities == nil {
r.Spec.Capabilities = make(map[OpAMPBridgeCapability]bool)
}
enabled, found := r.Spec.Capabilities[OpAMPBridgeCapabilityReportsStatus]
if !enabled || !found {
r.Spec.Capabilities[OpAMPBridgeCapabilityReportsStatus] = true
}
}

//+kubebuilder:webhook:path=/validate-opentelemetry-io-v1alpha1-opampbridge,mutating=false,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=create;update;delete,versions=v1alpha1,name=vopampbridge.kb.io,admissionReviewVersions=v1

var _ webhook.Validator = &OpAMPBridge{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
func (r *OpAMPBridge) ValidateCreate() (admission.Warnings, error) {
opampbridgelog.Info("validate create", "name", r.Name)
return nil, r.validateCRDSpec()
}

// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
func (r *OpAMPBridge) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
opampbridgelog.Info("validate update", "name", r.Name)
return nil, r.validateCRDSpec()
}

// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
func (r *OpAMPBridge) ValidateDelete() (admission.Warnings, error) {
opampbridgelog.Info("validate delete", "name", r.Name)
return nil, nil
}

func (r *OpAMPBridge) validateCRDSpec() error {
avadhut123pisal marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also check that the bridge has some capabilities enabled?

Copy link
Contributor Author

@avadhut123pisal avadhut123pisal Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specific set of capabilities ?

IMO, out of 10, these capabilities should be checked:

  1. AcceptsRemoteConfig
  2. ReportsEffectiveConfig
  3. AcceptsOpAMPConnectionSettings
  4. ReportsHealth
  5. ReportsRemoteConfig

@jaronoff97 is it ok ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh i meant that we should check that at least one capability is enabled, not a particular set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I will remove the current check. Non zero length check for the capabilities list is already there.


// check required fields

if len(strings.TrimSpace(r.Spec.Endpoint)) == 0 {
return fmt.Errorf("the OpAMP server endpoint is not specified")
}

if len(r.Spec.Capabilities) == 0 {
return fmt.Errorf("the capabilities supported by OpAMP Bridge are not specified")
}

// validate port config
for _, p := range r.Spec.Ports {
nameErrs := validation.IsValidPortName(p.Name)
numErrs := validation.IsValidPortNum(int(p.Port))
if len(nameErrs) > 0 || len(numErrs) > 0 {
return fmt.Errorf("the OpAMPBridge Spec Ports configuration is incorrect, port name '%s' errors: %s, num '%d' errors: %s",
p.Name, nameErrs, p.Port, numErrs)
}
}

// check for maximum replica count
if r.Spec.Replicas != nil && *r.Spec.Replicas > 1 {
return fmt.Errorf("replica count must not be greater than 1")
}
return nil
}
Loading
Loading