Skip to content

Commit

Permalink
fix/import and kustomize
Browse files Browse the repository at this point in the history
  • Loading branch information
bmiguel-teixeira committed Mar 28, 2024
1 parent ece0cd3 commit a0c7784
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
5 changes: 0 additions & 5 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
resources:
- manager.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
35 changes: 17 additions & 18 deletions internal/manifests/collector/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
logf "sigs.k8s.io/controller-runtime/pkg/log"

Expand Down Expand Up @@ -58,7 +57,7 @@ func TestContainerNewDefault(t *testing.T) {
OpenTelemetryCommonFields: v1beta1.OpenTelemetryCommonFields{
Ports: []v1beta1.PortsSpec{
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "metrics",
Port: 8888,
Protocol: corev1.ProtocolTCP,
Expand Down Expand Up @@ -120,7 +119,7 @@ service:
specConfig: "",
specPorts: []v1beta1.PortsSpec{
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "metrics",
Port: 8888,
Protocol: corev1.ProtocolTCP,
Expand All @@ -145,14 +144,14 @@ service:
description: "ports in spec ContainerPorts",
specPorts: []v1beta1.PortsSpec{
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "metrics",
Port: 8888,
Protocol: corev1.ProtocolTCP,
},
},
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "testport1",
Port: 12345,
},
Expand All @@ -171,13 +170,13 @@ service:
specConfig: goodConfig,
specPorts: []v1beta1.PortsSpec{
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "testport1",
Port: 12345,
},
},
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "testport2",
Port: 54321,
Protocol: corev1.ProtocolUDP,
Expand Down Expand Up @@ -206,13 +205,13 @@ service:
specConfig: goodConfig,
specPorts: []v1beta1.PortsSpec{
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "testport1",
Port: 12345,
},
},
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "testport1",
Port: 11111,
},
Expand Down Expand Up @@ -244,14 +243,14 @@ service:
`,
specPorts: []v1beta1.PortsSpec{
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "metrics",
Port: 8888,
Protocol: corev1.ProtocolTCP,
},
},
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "prometheus",
Port: 9090,
},
Expand Down Expand Up @@ -284,20 +283,20 @@ service:
`,
specPorts: []v1beta1.PortsSpec{
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "metrics",
Port: 8888,
Protocol: corev1.ProtocolTCP,
},
},
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "prometheus-dev",
Port: 9091,
},
},
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "prometheus-prod",
Port: 9090,
},
Expand All @@ -322,7 +321,7 @@ service:
endpoint: http://prometheus-server.monitoring/api/v1/write`,
specPorts: []v1beta1.PortsSpec{
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "metrics",
Port: 8888,
Protocol: corev1.ProtocolTCP,
Expand All @@ -348,20 +347,20 @@ service:
exporters: [prometheus/prod, prometheus/dev, prometheusremotewrite/prometheus, debug]`,
specPorts: []v1beta1.PortsSpec{
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "metrics",
Port: 8888,
Protocol: corev1.ProtocolTCP,
},
},
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "prometheus-dev",
Port: 9091,
},
},
{
ServicePort: v1.ServicePort{
ServicePort: corev1.ServicePort{
Name: "prometheus-prod",
Port: 9090,
},
Expand Down

0 comments on commit a0c7784

Please sign in to comment.