Skip to content

Commit

Permalink
[opentelemetry-operator] Fix Collector CRD referencing disabled webho…
Browse files Browse the repository at this point in the history
…ok (#1391)

* Fix Collector CRD referencing non-existing service due to webhooks disabled

* [chore] Bump chart version and generate examples

* Revert "[chore] Bump chart version and generate examples"

This reverts commit 26277e6.

* [chore] Generate Examples For OTEL Operator Only

* [fix] Fix test failure due to bundle CRDs diff due to webhook templating

* [chore] Make diff output silent again
  • Loading branch information
ElderMael authored Oct 18, 2024
1 parent db24e9a commit b8e727a
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 19 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ check-operator-crds:
$(call get-crd,${TMP_DIRECTORY}/crds/crd-opentelemetrycollector.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/community/manifests/opentelemetry.io_opentelemetrycollectors.yaml)
$(call get-crd,${TMP_DIRECTORY}/crds/crd-opentelemetryinstrumentation.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/community/manifests/opentelemetry.io_instrumentations.yaml)
$(call get-crd,${TMP_DIRECTORY}/crds/crd-opentelemetry.io_opampbridges.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/community/manifests/opentelemetry.io_opampbridges.yaml)

@sed -i '/{{- if \.Values\.admissionWebhooks\.create }}/d' "./charts/opentelemetry-operator/conf/crds/crd-opentelemetrycollector.yaml"
@sed -i '0,/{{- end }}/{/{{- end }}/d}' "./charts/opentelemetry-operator/conf/crds/crd-opentelemetrycollector.yaml"

if diff ${TMP_DIRECTORY}/crds ./charts/opentelemetry-operator/conf/crds > /dev/null; then \
echo "Passed"; \
rm -rf ${TMP_DIRECTORY}; \
Expand Down
2 changes: 1 addition & 1 deletion charts/opentelemetry-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-operator
version: 0.71.0
version: 0.71.1
description: OpenTelemetry Operator Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ metadata:
app.kubernetes.io/name: opentelemetry-operator
name: opentelemetrycollectors.opentelemetry.io
spec:
{{- if .Values.admissionWebhooks.create }}
conversion:
strategy: Webhook
webhook:
Expand All @@ -23,6 +24,7 @@ spec:
conversionReviewVersions:
- v1alpha1
- v1beta1
{{- end }}
group: opentelemetry.io
names:
kind: OpenTelemetryCollector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -91,7 +91,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -30,7 +30,7 @@ apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -223,7 +223,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -242,7 +242,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -26,7 +26,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -32,7 +32,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: opentelemetry-operator
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: "example-opentelemetry-operator-cert-manager"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: "example-opentelemetry-operator-metrics"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -44,7 +44,7 @@ metadata:
name: "example-opentelemetry-operator-webhook"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.71.0
helm.sh/chart: opentelemetry-operator-0.71.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.110.0"
app.kubernetes.io/managed-by: Helm
Expand Down

0 comments on commit b8e727a

Please sign in to comment.