diff --git a/.ci/olm-tests/catalog.yml b/.ci/olm-tests/catalog.yml index a55659dc9..7e4c029eb 100644 --- a/.ci/olm-tests/catalog.yml +++ b/.ci/olm-tests/catalog.yml @@ -5,4 +5,4 @@ metadata: namespace: olm spec: sourceType: grpc - image: kind-registry:5000/streamnativeio/function-mesh-catalog:v0.26.1 + image: localhost:5000/streamnativeio/function-mesh-catalog:v0.26.1 diff --git a/.ci/tests/integration-oauth2/cases/java-download-function-with-package-service/manifests.yaml b/.ci/tests/integration-oauth2/cases/java-download-function-with-package-service/manifests.yaml index c4d407e6e..92a88fb4d 100644 --- a/.ci/tests/integration-oauth2/cases/java-download-function-with-package-service/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/java-download-function-with-package-service/manifests.yaml @@ -46,7 +46,7 @@ spec: issuerUrl: https://auth.sncloud-stg.dev/ keySecretName: sn-platform-oauth2-private-key keySecretKey: auth.json - packageService: + pulsarPackageService: pulsarConfig: "test-pulsar-package-service" tlsConfig: enabled: false diff --git a/.github/workflows/bundle-release.yml b/.github/workflows/bundle-release.yml index dab7eea51..5c17babe7 100644 --- a/.github/workflows/bundle-release.yml +++ b/.github/workflows/bundle-release.yml @@ -49,10 +49,10 @@ jobs: username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Set up GO 1.24.13 + - name: Set up GO 1.25.8 uses: actions/setup-go@v5 with: - go-version: 1.24.13 + go-version: 1.25.8 id: go - name: InstallKubebuilder @@ -180,10 +180,10 @@ jobs: username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Set up GO 1.24.13 + - name: Set up GO 1.25.8 uses: actions/setup-go@v5 with: - go-version: 1.24.13 + go-version: 1.25.8 id: go - name: InstallKubebuilder diff --git a/.github/workflows/olm-verify.yml b/.github/workflows/olm-verify.yml index 068f76ed1..46674218d 100644 --- a/.github/workflows/olm-verify.yml +++ b/.github/workflows/olm-verify.yml @@ -34,10 +34,10 @@ jobs: - name: checkout uses: actions/checkout@v2 - - name: Set up GO 1.24.13 + - name: Set up GO 1.25.8 uses: actions/setup-go@v5 with: - go-version: 1.24.13 + go-version: 1.25.8 id: go - name: InstallKubebuilder @@ -57,15 +57,14 @@ jobs: sudo chmod +x /usr/bin/yq yq --help - - name: Kubernetes KinD Cluster - uses: container-tools/kind-action@v1 - with: - node_image: kindest/node:v1.23.17 + - name: Create kind cluster + run: | + hack/kind-cluster-build.sh --name olm-verify -c 1 -v 10 --k8sVersion v1.23.17 - name: Build RedHat certificated bundle And Publish to Quay env: - DOCKER_REPO: kind-registry:5000/streamnativeio - IMAGE_TAG_BASE: kind-registry:5000/streamnativeio/function-mesh + DOCKER_REPO: localhost:5000/streamnativeio + IMAGE_TAG_BASE: localhost:5000/streamnativeio/function-mesh CATALOG_BRANCH_TAG: latest run: | echo $VERSION diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml index 8970481db..4bcfed199 100644 --- a/.github/workflows/project.yml +++ b/.github/workflows/project.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - go-version: [1.22.12, 1.24.13] + go-version: [1.25.8] steps: - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@v1.3.0 @@ -51,7 +51,7 @@ jobs: - name: InstallTool run: | - wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.64.7 + GOBIN=$(pwd)/bin go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.7 ./bin/golangci-lint --version - name: validate controller-gen diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 44ceef083..812503579 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,10 +37,10 @@ jobs: username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Set up GO 1.24.13 + - name: Set up GO 1.25.8 uses: actions/setup-go@v5 with: - go-version: 1.24.13 + go-version: 1.25.8 id: go - name: InstallKubebuilder diff --git a/.github/workflows/test-helm-charts.yml b/.github/workflows/test-helm-charts.yml index 3c1b86028..9cdc0d0f8 100644 --- a/.github/workflows/test-helm-charts.yml +++ b/.github/workflows/test-helm-charts.yml @@ -83,11 +83,11 @@ jobs: run: hack/kind-cluster-build.sh --name chart-testing -c 1 -v 10 --k8sVersion v1.23.17 if: steps.list-changed.outputs.changed == 'true' - - name: Set up GO 1.24.13 + - name: Set up GO 1.25.8 if: steps.list-changed.outputs.changed == 'true' uses: actions/setup-go@v5 with: - go-version: 1.24.13 + go-version: 1.25.8 id: go - name: setup kubebuilder 3.6.0 diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index c9aa13869..c9dc3bc3b 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -57,10 +57,10 @@ jobs: repository: ${{github.event.pull_request.head.repo.full_name}} ref: ${{ github.event.pull_request.head.sha }} - - name: Set up GO 1.24.13 + - name: Set up GO 1.25.8 uses: actions/setup-go@v5 with: - go-version: 1.24.13 + go-version: 1.25.8 id: go - name: InstallKubebuilder diff --git a/.github/workflows/trivy_scheduled_master.yml b/.github/workflows/trivy_scheduled_master.yml index e40563606..1bd13ec75 100644 --- a/.github/workflows/trivy_scheduled_master.yml +++ b/.github/workflows/trivy_scheduled_master.yml @@ -67,10 +67,10 @@ jobs: repository: ${{github.event.pull_request.head.repo.full_name}} ref: ${{ github.event.pull_request.head.sha }} - - name: Set up GO 1.24.13 + - name: Set up GO 1.25.8 uses: actions/setup-go@v5 with: - go-version: 1.24.13 + go-version: 1.25.8 id: go - name: InstallKubebuilder diff --git a/Dockerfile b/Dockerfile index 9e25b98c8..ee61e169f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.24.13-trixie as builder +FROM golang:1.25.8-trixie AS builder WORKDIR /workspace/api COPY api/ . diff --git a/Makefile b/Makefile index 5facd0897..923c1d06b 100644 --- a/Makefile +++ b/Makefile @@ -130,7 +130,7 @@ image-push: # find or download controller-gen # download controller-gen if necessary controller-gen: - $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.15.0) + $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.5) kustomize: ## Download kustomize locally if necessary. $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v4@v4.5.5) diff --git a/api/compute/v1alpha1/function_types.go b/api/compute/v1alpha1/function_types.go index 5379437c7..6823c3b2f 100644 --- a/api/compute/v1alpha1/function_types.go +++ b/api/compute/v1alpha1/function_types.go @@ -93,9 +93,9 @@ type FunctionSpec struct { // +kubebuilder:validation:Required Messaging `json:",inline"` - // PackageService is used for package download when specified. + // PulsarPackageService is used for package download when specified. // If empty, the package download falls back to Messaging.Pulsar. - PackageService *PulsarMessaging `json:"packageService,omitempty"` + PulsarPackageService *PulsarMessaging `json:"pulsarPackageService,omitempty"` // +kubebuilder:validation:Required Runtime `json:",inline"` diff --git a/api/compute/v1alpha1/sink_types.go b/api/compute/v1alpha1/sink_types.go index ddb6d6048..fc3f16016 100644 --- a/api/compute/v1alpha1/sink_types.go +++ b/api/compute/v1alpha1/sink_types.go @@ -86,9 +86,9 @@ type SinkSpec struct { // +kubebuilder:validation:Required Messaging `json:",inline"` - // PackageService is used for package download when specified. + // PulsarPackageService is used for package download when specified. // If empty, the package download falls back to Messaging.Pulsar. - PackageService *PulsarMessaging `json:"packageService,omitempty"` + PulsarPackageService *PulsarMessaging `json:"pulsarPackageService,omitempty"` // +kubebuilder:validation:Required Runtime `json:",inline"` diff --git a/api/compute/v1alpha1/source_types.go b/api/compute/v1alpha1/source_types.go index 8f116e9c7..3f1da270b 100644 --- a/api/compute/v1alpha1/source_types.go +++ b/api/compute/v1alpha1/source_types.go @@ -82,9 +82,9 @@ type SourceSpec struct { // +kubebuilder:validation:Required Messaging `json:",inline"` - // PackageService is used for package download when specified. + // PulsarPackageService is used for package download when specified. // If empty, the package download falls back to Messaging.Pulsar. - PackageService *PulsarMessaging `json:"packageService,omitempty"` + PulsarPackageService *PulsarMessaging `json:"pulsarPackageService,omitempty"` // +kubebuilder:validation:Required Runtime `json:",inline"` diff --git a/api/compute/v1alpha1/zz_generated.deepcopy.go b/api/compute/v1alpha1/zz_generated.deepcopy.go index 6d44ac0a9..f66a8ac6a 100644 --- a/api/compute/v1alpha1/zz_generated.deepcopy.go +++ b/api/compute/v1alpha1/zz_generated.deepcopy.go @@ -536,8 +536,8 @@ func (in *FunctionSpec) DeepCopyInto(out *FunctionSpec) { (*in).DeepCopyInto(*out) } in.Messaging.DeepCopyInto(&out.Messaging) - if in.PackageService != nil { - in, out := &in.PackageService, &out.PackageService + if in.PulsarPackageService != nil { + in, out := &in.PulsarPackageService, &out.PulsarPackageService *out = new(PulsarMessaging) (*in).DeepCopyInto(*out) } @@ -1276,8 +1276,8 @@ func (in *SinkSpec) DeepCopyInto(out *SinkSpec) { } in.Pod.DeepCopyInto(&out.Pod) in.Messaging.DeepCopyInto(&out.Messaging) - if in.PackageService != nil { - in, out := &in.PackageService, &out.PackageService + if in.PulsarPackageService != nil { + in, out := &in.PulsarPackageService, &out.PulsarPackageService *out = new(PulsarMessaging) (*in).DeepCopyInto(*out) } @@ -1454,8 +1454,8 @@ func (in *SourceSpec) DeepCopyInto(out *SourceSpec) { } in.Pod.DeepCopyInto(&out.Pod) in.Messaging.DeepCopyInto(&out.Messaging) - if in.PackageService != nil { - in, out := &in.PackageService, &out.PackageService + if in.PulsarPackageService != nil { + in, out := &in.PulsarPackageService, &out.PulsarPackageService *out = new(PulsarMessaging) (*in).DeepCopyInto(*out) } diff --git a/api/go.mod b/api/go.mod index b2297c29a..69f920476 100644 --- a/api/go.mod +++ b/api/go.mod @@ -1,6 +1,6 @@ module github.com/streamnative/function-mesh/api -go 1.24.13 +go 1.25.8 require ( k8s.io/api v0.30.9 diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-backendconfigs.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-backendconfigs.yaml index b6801fea5..dbf4536c4 100644 --- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-backendconfigs.yaml +++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-backendconfigs.yaml @@ -6,7 +6,7 @@ metadata: {{- if eq .Values.admissionWebhook.certificate.provider "cert-manager" }} {{- include "function-mesh-operator.certManager.annotation" . | nindent 4 -}} {{- end }} - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: backendconfigs.compute.functionmesh.io spec: conversion: @@ -1159,6 +1159,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1265,6 +1266,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1463,6 +1465,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1934,6 +1937,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2040,6 +2044,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2238,6 +2243,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml index c2a144942..0392a0e74 100644 --- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml +++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: functionmeshes.compute.functionmesh.io spec: group: compute.functionmesh.io @@ -352,90 +352,6 @@ spec: typeClassName: type: string type: object - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object persistentVolumeClaimRetentionPolicy: properties: whenDeleted: @@ -1546,6 +1462,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1652,6 +1569,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1850,6 +1768,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2321,6 +2240,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2427,6 +2347,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2625,6 +2546,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -3692,6 +3614,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -4104,6 +4110,8 @@ spec: required: - actualWindowFunctionClassName type: object + required: + - "" type: object type: array sinks: @@ -4360,90 +4368,6 @@ spec: negativeAckRedeliveryDelayMs: format: int32 type: integer - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object pod: properties: affinity: @@ -5547,6 +5471,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -5653,6 +5578,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -5851,6 +5777,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -6322,6 +6249,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -6428,6 +6356,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -6626,6 +6555,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -7693,6 +7623,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -7857,6 +7871,8 @@ spec: - name type: object type: array + required: + - "" type: object type: array sources: @@ -8108,90 +8124,6 @@ spec: typeClassName: type: string type: object - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object pod: properties: affinity: @@ -9295,6 +9227,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -9401,6 +9334,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -9599,6 +9533,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -10070,6 +10005,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -10176,6 +10112,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -10374,6 +10311,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -11441,6 +11379,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -11591,6 +11613,8 @@ spec: - name type: object type: array + required: + - "" type: object type: array type: object diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml index e9b293657..490a10b1d 100644 --- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml +++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml @@ -6,7 +6,7 @@ metadata: {{- if eq .Values.admissionWebhook.certificate.provider "cert-manager" }} {{- include "function-mesh-operator.certManager.annotation" . | nindent 4 -}} {{- end }} - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: functions.compute.functionmesh.io spec: conversion: @@ -371,90 +371,6 @@ spec: typeClassName: type: string type: object - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object persistentVolumeClaimRetentionPolicy: properties: whenDeleted: @@ -1565,6 +1481,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1671,6 +1588,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1869,6 +1787,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2340,6 +2259,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2446,6 +2366,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2644,6 +2565,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -3711,6 +3633,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -4123,6 +4129,8 @@ spec: required: - actualWindowFunctionClassName type: object + required: + - "" type: object status: properties: diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sinks.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sinks.yaml index 924f1b1d8..3b8c22fab 100644 --- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sinks.yaml +++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sinks.yaml @@ -6,7 +6,7 @@ metadata: {{- if eq .Values.admissionWebhook.certificate.provider "cert-manager" }} {{- include "function-mesh-operator.certManager.annotation" . | nindent 4 -}} {{- end }} - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: sinks.compute.functionmesh.io spec: conversion: @@ -299,90 +299,6 @@ spec: negativeAckRedeliveryDelayMs: format: int32 type: integer - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object pod: properties: affinity: @@ -1486,6 +1402,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1592,6 +1509,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1790,6 +1708,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2261,6 +2180,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2367,6 +2287,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2565,6 +2486,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -3632,6 +3554,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -3796,6 +3802,8 @@ spec: - name type: object type: array + required: + - "" type: object status: properties: diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sources.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sources.yaml index 2b353937a..bcaa0f752 100644 --- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sources.yaml +++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sources.yaml @@ -6,7 +6,7 @@ metadata: {{- if eq .Values.admissionWebhook.certificate.provider "cert-manager" }} {{- include "function-mesh-operator.certManager.annotation" . | nindent 4 -}} {{- end }} - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: sources.compute.functionmesh.io spec: conversion: @@ -294,90 +294,6 @@ spec: typeClassName: type: string type: object - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object pod: properties: affinity: @@ -1481,6 +1397,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1587,6 +1504,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1785,6 +1703,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2256,6 +2175,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2362,6 +2282,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2560,6 +2481,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -3627,6 +3549,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -3777,6 +3783,8 @@ spec: - name type: object type: array + required: + - "" type: object status: properties: diff --git a/config/crd/bases/compute.functionmesh.io_backendconfigs.yaml b/config/crd/bases/compute.functionmesh.io_backendconfigs.yaml index 24e15f4a6..acbb2d60f 100644 --- a/config/crd/bases/compute.functionmesh.io_backendconfigs.yaml +++ b/config/crd/bases/compute.functionmesh.io_backendconfigs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: backendconfigs.compute.functionmesh.io spec: group: compute.functionmesh.io @@ -1137,6 +1137,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1243,6 +1244,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1441,6 +1443,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1912,6 +1915,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2018,6 +2022,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2216,6 +2221,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port diff --git a/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml b/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml index da0f23e78..72f2b1591 100644 --- a/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml +++ b/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: functionmeshes.compute.functionmesh.io spec: group: compute.functionmesh.io @@ -352,90 +352,6 @@ spec: typeClassName: type: string type: object - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object persistentVolumeClaimRetentionPolicy: properties: whenDeleted: @@ -1546,6 +1462,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1652,6 +1569,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1850,6 +1768,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2321,6 +2240,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2427,6 +2347,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2625,6 +2546,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -3692,6 +3614,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -4104,6 +4110,8 @@ spec: required: - actualWindowFunctionClassName type: object + required: + - "" type: object type: array sinks: @@ -4360,90 +4368,6 @@ spec: negativeAckRedeliveryDelayMs: format: int32 type: integer - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object pod: properties: affinity: @@ -5547,6 +5471,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -5653,6 +5578,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -5851,6 +5777,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -6322,6 +6249,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -6428,6 +6356,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -6626,6 +6555,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -7693,6 +7623,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -7857,6 +7871,8 @@ spec: - name type: object type: array + required: + - "" type: object type: array sources: @@ -8108,90 +8124,6 @@ spec: typeClassName: type: string type: object - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object pod: properties: affinity: @@ -9295,6 +9227,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -9401,6 +9334,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -9599,6 +9533,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -10070,6 +10005,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -10176,6 +10112,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -10374,6 +10311,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -11441,6 +11379,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -11591,6 +11613,8 @@ spec: - name type: object type: array + required: + - "" type: object type: array type: object diff --git a/config/crd/bases/compute.functionmesh.io_functions.yaml b/config/crd/bases/compute.functionmesh.io_functions.yaml index 58cebd789..82176b228 100644 --- a/config/crd/bases/compute.functionmesh.io_functions.yaml +++ b/config/crd/bases/compute.functionmesh.io_functions.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: functions.compute.functionmesh.io spec: group: compute.functionmesh.io @@ -349,90 +349,6 @@ spec: typeClassName: type: string type: object - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object persistentVolumeClaimRetentionPolicy: properties: whenDeleted: @@ -1543,6 +1459,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1649,6 +1566,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1847,6 +1765,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2318,6 +2237,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2424,6 +2344,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2622,6 +2543,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -3689,6 +3611,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -4101,6 +4107,8 @@ spec: required: - actualWindowFunctionClassName type: object + required: + - "" type: object status: properties: diff --git a/config/crd/bases/compute.functionmesh.io_sinks.yaml b/config/crd/bases/compute.functionmesh.io_sinks.yaml index 49d62e2cc..2ae2569eb 100644 --- a/config/crd/bases/compute.functionmesh.io_sinks.yaml +++ b/config/crd/bases/compute.functionmesh.io_sinks.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: sinks.compute.functionmesh.io spec: group: compute.functionmesh.io @@ -277,90 +277,6 @@ spec: negativeAckRedeliveryDelayMs: format: int32 type: integer - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object pod: properties: affinity: @@ -1464,6 +1380,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1570,6 +1487,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1768,6 +1686,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2239,6 +2158,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2345,6 +2265,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2543,6 +2464,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -3610,6 +3532,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -3774,6 +3780,8 @@ spec: - name type: object type: array + required: + - "" type: object status: properties: diff --git a/config/crd/bases/compute.functionmesh.io_sources.yaml b/config/crd/bases/compute.functionmesh.io_sources.yaml index 2ad88024c..0dada2978 100644 --- a/config/crd/bases/compute.functionmesh.io_sources.yaml +++ b/config/crd/bases/compute.functionmesh.io_sources.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: sources.compute.functionmesh.io spec: group: compute.functionmesh.io @@ -272,90 +272,6 @@ spec: typeClassName: type: string type: object - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object pod: properties: affinity: @@ -1459,6 +1375,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1565,6 +1482,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1763,6 +1681,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2234,6 +2153,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2340,6 +2260,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2538,6 +2459,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -3605,6 +3527,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -3755,6 +3761,8 @@ spec: - name type: object type: array + required: + - "" type: object status: properties: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 0f8dd41ef..dfd5da48a 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -5,9 +5,12 @@ metadata: name: manager-role rules: - apiGroups: - - apps + - "" resources: - - statefulsets + - pods + - pods/exec + - secrets + - services verbs: - create - delete @@ -17,9 +20,9 @@ rules: - update - watch - apiGroups: - - autoscaling + - apps resources: - - horizontalpodautoscalers + - statefulsets verbs: - create - delete @@ -29,9 +32,9 @@ rules: - update - watch - apiGroups: - - autoscaling.k8s.io + - autoscaling resources: - - verticalpodautoscalers + - horizontalpodautoscalers verbs: - create - delete @@ -41,20 +44,9 @@ rules: - update - watch - apiGroups: - - batch - resources: - - jobs - verbs: - - create - - delete - - get - - list - - update - - watch -- apiGroups: - - compute.functionmesh.io + - autoscaling.k8s.io resources: - - backendconfigs + - verticalpodautoscalers verbs: - create - delete @@ -64,56 +56,24 @@ rules: - update - watch - apiGroups: - - compute.functionmesh.io + - batch resources: - - functionmeshes + - jobs verbs: - create - delete - get - list - - patch - update - watch - apiGroups: - compute.functionmesh.io resources: - - functionmeshes/status - verbs: - - get - - patch - - update -- apiGroups: - - compute.functionmesh.io - resources: + - backendconfigs + - functionmeshes - functions - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - compute.functionmesh.io - resources: - - functions/finalizers - verbs: - - get - - update -- apiGroups: - - compute.functionmesh.io - resources: - - functions/status - verbs: - - get - - patch - - update -- apiGroups: - - compute.functionmesh.io - resources: - sinks + - sources verbs: - create - delete @@ -125,14 +85,10 @@ rules: - apiGroups: - compute.functionmesh.io resources: - - sinks/finalizers - verbs: - - get - - update -- apiGroups: - - compute.functionmesh.io - resources: + - functionmeshes/status + - functions/status - sinks/status + - sources/status verbs: - get - patch @@ -140,30 +96,12 @@ rules: - apiGroups: - compute.functionmesh.io resources: - - sources - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - compute.functionmesh.io - resources: + - functions/finalizers + - sinks/finalizers - sources/finalizers verbs: - get - update -- apiGroups: - - compute.functionmesh.io - resources: - - sources/status - verbs: - - get - - patch - - update - apiGroups: - coordination.k8s.io resources: @@ -174,51 +112,3 @@ rules: - get - list - update -- apiGroups: - - "" - resources: - - pods - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - pods/exec - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - secrets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch diff --git a/controllers/spec/function.go b/controllers/spec/function.go index 221f848ec..deca89f1f 100644 --- a/controllers/spec/function.go +++ b/controllers/spec/function.go @@ -66,7 +66,7 @@ func MakeFunctionStatefulSet(ctx context.Context, cli client.Client, function *v function.Spec.ImagePullPolicy = runnerImagePullPolicy labels := makeFunctionLabels(function) - downloadConfig := newDownloadServiceConfig(function.Spec.PackageService, function.Spec.Pulsar) + downloadConfig := newDownloadServiceConfig(function.Spec.PulsarPackageService, function.Spec.Pulsar) statefulSet := MakeStatefulSet(objectMeta, function.Spec.Replicas, function.Spec.DownloaderImage, makeFunctionContainer(function), makeFunctionVolumes(function, function.Spec.Pulsar.AuthConfig), labels, function.Spec.Pod, function.Spec.Pulsar, downloadConfig, function.Spec.Java, function.Spec.Python, function.Spec.Golang, function.Spec.Pod.Env, @@ -156,7 +156,7 @@ func makeFunctionVolumes(function *v1alpha1.Function, authConfig *v1alpha1.AuthC authConfig, GetRuntimeLogConfigNames(function.Spec.Java, function.Spec.Python, function.Spec.Golang), function.Spec.LogTopicAgent) - return appendPackageServiceVolumes(volumes, function.Spec.PackageService) + return appendPackageServiceVolumes(volumes, function.Spec.PulsarPackageService) } func makeFunctionVolumeMounts(function *v1alpha1.Function, authConfig *v1alpha1.AuthConfig) []corev1.VolumeMount { @@ -177,16 +177,16 @@ func makeFunctionContainer(function *v1alpha1.Function) *corev1.Container { probe := MakeLivenessProbe(function.Spec.Pod.Liveness) allowPrivilegeEscalation := false mounts := makeFunctionVolumeMounts(function, function.Spec.Pulsar.AuthConfig) - mounts = appendPackageServiceVolumeMounts(mounts, function.Spec.PackageService) + mounts = appendPackageServiceVolumeMounts(mounts, function.Spec.PulsarPackageService) if utils.EnableInitContainers { mounts = append(mounts, generateDownloaderVolumeMountsForRuntime(function.Spec.Java, function.Spec.Python, function.Spec.Golang, function.Spec.GenericRuntime)...) } envFrom := GenerateContainerEnvFrom(function.Spec.Pulsar.PulsarConfig, function.Spec.Pulsar.AuthSecret, function.Spec.Pulsar.TLSSecret) - if function.Spec.PackageService != nil { - envFrom = append(envFrom, GenerateContainerEnvFromWithPrefix(function.Spec.PackageService.PulsarConfig, - function.Spec.PackageService.AuthSecret, function.Spec.PackageService.TLSSecret, PackageServiceEnvPrefix)...) + if function.Spec.PulsarPackageService != nil { + envFrom = append(envFrom, GenerateContainerEnvFromWithPrefix(function.Spec.PulsarPackageService.PulsarConfig, + function.Spec.PulsarPackageService.AuthSecret, function.Spec.PulsarPackageService.TLSSecret, PackageServiceEnvPrefix)...) } return &corev1.Container{ // TODO new container to pull user code image and upload jars into bookkeeper @@ -229,7 +229,7 @@ func makeFunctionLabels(function *v1alpha1.Function) map[string]string { func makeFunctionCommand(function *v1alpha1.Function) []string { spec := function.Spec - downloadConfig := newDownloadServiceConfig(spec.PackageService, spec.Pulsar) + downloadConfig := newDownloadServiceConfig(spec.PulsarPackageService, spec.Pulsar) connectorsDirectory := "" if spec.SourceConfig != nil || spec.SinkConfig != nil { diff --git a/controllers/spec/function_test.go b/controllers/spec/function_test.go index c881c8934..cfb264beb 100644 --- a/controllers/spec/function_test.go +++ b/controllers/spec/function_test.go @@ -126,7 +126,7 @@ func TestInitContainerDownloader(t *testing.T) { function.Spec.ImagePullPolicy = runnerImagePullPolicy labels := makeFunctionLabels(function) - downloadConfig := newDownloadServiceConfig(function.Spec.PackageService, function.Spec.Pulsar) + downloadConfig := newDownloadServiceConfig(function.Spec.PulsarPackageService, function.Spec.Pulsar) statefulSet := MakeStatefulSet(objectMeta, function.Spec.Replicas, function.Spec.DownloaderImage, makeFunctionContainer(function), makeFunctionVolumes(function, function.Spec.Pulsar.AuthConfig), labels, function.Spec.Pod, function.Spec.Pulsar, downloadConfig, function.Spec.Java, function.Spec.Python, function.Spec.Golang, function.Spec.Pod.Env, @@ -232,7 +232,7 @@ func TestJavaFunctionCommandWithConnectorOverrides(t *testing.T) { assert.Equal(t, producerConfig["enable.idempotence"], true) } -func TestFunctionPackageServiceDownloadCommandAndPodWiring(t *testing.T) { +func TestFunctionPulsarPackageServiceDownloadCommandAndPodWiring(t *testing.T) { previous := utils.EnableInitContainers defer func() { utils.EnableInitContainers = previous @@ -242,7 +242,7 @@ func TestFunctionPackageServiceDownloadCommandAndPodWiring(t *testing.T) { function.Spec.Pulsar.PulsarConfig = "runtime-pulsar" function.Spec.Pulsar.AuthSecret = "runtime-auth" function.Spec.Pulsar.TLSSecret = "runtime-tls" - function.Spec.PackageService = &v1alpha1.PulsarMessaging{ + function.Spec.PulsarPackageService = &v1alpha1.PulsarMessaging{ PulsarConfig: "package-pulsar", AuthSecret: "package-auth", TLSSecret: "package-tls", @@ -295,7 +295,7 @@ func TestFunctionPackageServiceDownloadCommandAndPodWiring(t *testing.T) { assert.Assert(t, hasPackageOAuthMount, "container should include package service oauth2 mount") } -func TestFunctionPackageServiceDownloadFallbackToMessaging(t *testing.T) { +func TestFunctionPulsarPackageServiceDownloadFallbackToMessaging(t *testing.T) { previous := utils.EnableInitContainers defer func() { utils.EnableInitContainers = previous diff --git a/controllers/spec/sink.go b/controllers/spec/sink.go index 8c47bb557..ec1aa093f 100644 --- a/controllers/spec/sink.go +++ b/controllers/spec/sink.go @@ -62,7 +62,7 @@ func MakeSinkStatefulSet(ctx context.Context, cli client.Client, sink *v1alpha1. runnerImagePullPolicy := getSinkRunnerImagePullPolicy() sink.Spec.ImagePullPolicy = runnerImagePullPolicy - downloadConfig := newDownloadServiceConfig(sink.Spec.PackageService, sink.Spec.Pulsar) + downloadConfig := newDownloadServiceConfig(sink.Spec.PulsarPackageService, sink.Spec.Pulsar) statefulSet := MakeStatefulSet(objectMeta, sink.Spec.Replicas, sink.Spec.DownloaderImage, makeSinkContainer(sink), makeSinkVolumes(sink, sink.Spec.Pulsar.AuthConfig), makeSinkLabels(sink), sink.Spec.Pod, sink.Spec.Pulsar, downloadConfig, @@ -107,15 +107,15 @@ func makeSinkContainer(sink *v1alpha1.Sink) *corev1.Container { probe := MakeLivenessProbe(sink.Spec.Pod.Liveness) allowPrivilegeEscalation := false mounts := makeSinkVolumeMounts(sink, sink.Spec.Pulsar.AuthConfig) - mounts = appendPackageServiceVolumeMounts(mounts, sink.Spec.PackageService) + mounts = appendPackageServiceVolumeMounts(mounts, sink.Spec.PulsarPackageService) if utils.EnableInitContainers { mounts = append(mounts, generateDownloaderVolumeMountsForRuntime(sink.Spec.Java, nil, nil, nil)...) } envFrom := GenerateContainerEnvFrom(sink.Spec.Pulsar.PulsarConfig, sink.Spec.Pulsar.AuthSecret, sink.Spec.Pulsar.TLSSecret) - if sink.Spec.PackageService != nil { - envFrom = append(envFrom, GenerateContainerEnvFromWithPrefix(sink.Spec.PackageService.PulsarConfig, - sink.Spec.PackageService.AuthSecret, sink.Spec.PackageService.TLSSecret, PackageServiceEnvPrefix)...) + if sink.Spec.PulsarPackageService != nil { + envFrom = append(envFrom, GenerateContainerEnvFromWithPrefix(sink.Spec.PulsarPackageService.PulsarConfig, + sink.Spec.PulsarPackageService.AuthSecret, sink.Spec.PulsarPackageService.TLSSecret, PackageServiceEnvPrefix)...) } return &corev1.Container{ // TODO new container to pull user code image and upload jars into bookkeeper @@ -212,7 +212,7 @@ func makeSinkVolumes(sink *v1alpha1.Sink, authConfig *v1alpha1.AuthConfig) []cor authConfig, GetRuntimeLogConfigNames(sink.Spec.Java, sink.Spec.Python, sink.Spec.Golang), sink.Spec.LogTopicAgent) - return appendPackageServiceVolumes(volumes, sink.Spec.PackageService) + return appendPackageServiceVolumes(volumes, sink.Spec.PulsarPackageService) } func makeSinkVolumeMounts(sink *v1alpha1.Sink, authConfig *v1alpha1.AuthConfig) []corev1.VolumeMount { @@ -228,7 +228,7 @@ func makeSinkVolumeMounts(sink *v1alpha1.Sink, authConfig *v1alpha1.AuthConfig) func MakeSinkCommand(sink *v1alpha1.Sink) []string { spec := sink.Spec - downloadConfig := newDownloadServiceConfig(spec.PackageService, spec.Pulsar) + downloadConfig := newDownloadServiceConfig(spec.PulsarPackageService, spec.Pulsar) hasPulsarctl := sink.Spec.ImageHasPulsarctl hasWget := sink.Spec.ImageHasWget if match, _ := regexp.MatchString(RunnerImageHasPulsarctl, sink.Spec.Image); match { diff --git a/controllers/spec/source.go b/controllers/spec/source.go index 04137f7f1..2b86b9b2e 100644 --- a/controllers/spec/source.go +++ b/controllers/spec/source.go @@ -62,7 +62,7 @@ func MakeSourceStatefulSet(ctx context.Context, cli client.Client, source *v1alp runnerImagePullPolicy := getSourceRunnerImagePullPolicy() source.Spec.ImagePullPolicy = runnerImagePullPolicy - downloadConfig := newDownloadServiceConfig(source.Spec.PackageService, source.Spec.Pulsar) + downloadConfig := newDownloadServiceConfig(source.Spec.PulsarPackageService, source.Spec.Pulsar) statefulSet := MakeStatefulSet(objectMeta, source.Spec.Replicas, source.Spec.DownloaderImage, makeSourceContainer(source), makeSourceVolumes(source, source.Spec.Pulsar.AuthConfig), makeSourceLabels(source), source.Spec.Pod, source.Spec.Pulsar, downloadConfig, @@ -102,15 +102,15 @@ func makeSourceContainer(source *v1alpha1.Source) *corev1.Container { probe := MakeLivenessProbe(source.Spec.Pod.Liveness) allowPrivilegeEscalation := false mounts := makeSourceVolumeMounts(source, source.Spec.Pulsar.AuthConfig) - mounts = appendPackageServiceVolumeMounts(mounts, source.Spec.PackageService) + mounts = appendPackageServiceVolumeMounts(mounts, source.Spec.PulsarPackageService) if utils.EnableInitContainers { mounts = append(mounts, generateDownloaderVolumeMountsForRuntime(source.Spec.Java, nil, nil, nil)...) } envFrom := GenerateContainerEnvFrom(source.Spec.Pulsar.PulsarConfig, source.Spec.Pulsar.AuthSecret, source.Spec.Pulsar.TLSSecret) - if source.Spec.PackageService != nil { - envFrom = append(envFrom, GenerateContainerEnvFromWithPrefix(source.Spec.PackageService.PulsarConfig, - source.Spec.PackageService.AuthSecret, source.Spec.PackageService.TLSSecret, PackageServiceEnvPrefix)...) + if source.Spec.PulsarPackageService != nil { + envFrom = append(envFrom, GenerateContainerEnvFromWithPrefix(source.Spec.PulsarPackageService.PulsarConfig, + source.Spec.PulsarPackageService.AuthSecret, source.Spec.PulsarPackageService.TLSSecret, PackageServiceEnvPrefix)...) } return &corev1.Container{ // TODO new container to pull user code image and upload jars into bookkeeper @@ -158,7 +158,7 @@ func makeSourceVolumes(source *v1alpha1.Source, authConfig *v1alpha1.AuthConfig) authConfig, GetRuntimeLogConfigNames(source.Spec.Java, source.Spec.Python, source.Spec.Golang), source.Spec.LogTopicAgent) - return appendPackageServiceVolumes(volumes, source.Spec.PackageService) + return appendPackageServiceVolumes(volumes, source.Spec.PulsarPackageService) } func makeSourceVolumeMounts(source *v1alpha1.Source, authConfig *v1alpha1.AuthConfig) []corev1.VolumeMount { @@ -174,7 +174,7 @@ func makeSourceVolumeMounts(source *v1alpha1.Source, authConfig *v1alpha1.AuthCo func makeSourceCommand(source *v1alpha1.Source) []string { spec := source.Spec - downloadConfig := newDownloadServiceConfig(spec.PackageService, spec.Pulsar) + downloadConfig := newDownloadServiceConfig(spec.PulsarPackageService, spec.Pulsar) hasPulsarctl := source.Spec.ImageHasPulsarctl hasWget := source.Spec.ImageHasWget if match, _ := regexp.MatchString(RunnerImageHasPulsarctl, source.Spec.Image); match { diff --git a/docs/design/package-service-download-design.md b/docs/design/package-service-download-design.md index c7a2cde90..5a4ba864e 100644 --- a/docs/design/package-service-download-design.md +++ b/docs/design/package-service-download-design.md @@ -1,11 +1,11 @@ -# Design: Separate Package Download Service (`PackageService`) +# Design: Separate Package Download Service (`PulsarPackageService`) ## Summary -This change adds optional `spec.packageService` support to `Function`, `Source`, and `Sink` so package download can use a dedicated Pulsar admin service configuration instead of reusing runtime `spec.pulsar` (`Messaging`). +This change adds optional `spec.pulsarPackageService` support to `Function`, `Source`, and `Sink` so package download can use a dedicated Pulsar admin service configuration instead of reusing runtime `spec.pulsar` (`Messaging`). -If `packageService` is set, package download uses it. -If `packageService` is not set, behavior remains unchanged and falls back to `spec.pulsar`. +If `pulsarPackageService` is set, package download uses it. +If `pulsarPackageService` is not set, behavior remains unchanged and falls back to `spec.pulsar`. ## Motivation @@ -39,12 +39,12 @@ Added to: Field: -- `packageService *PulsarMessaging \`json:"packageService,omitempty"\`` +- `pulsarPackageService *PulsarMessaging \`json:"pulsarPackageService,omitempty"\`` Validation: -- `packageService` is optional. -- When provided, `packageService.pulsarConfig` must be non-empty. +- `pulsarPackageService` is optional. +- When provided, `pulsarPackageService.pulsarConfig` must be non-empty. - Existing `spec.pulsar` validation remains required as before. ## Controller/Spec Design @@ -53,7 +53,7 @@ Validation: A download service config is derived as: -1. Use `spec.packageService` when non-nil. +1. Use `spec.pulsarPackageService` when non-nil. 2. Else use `spec.pulsar`. This selected config is used only for package download command/env/volume wiring. @@ -70,7 +70,7 @@ Runtime messaging still uses `spec.pulsar`. ### Env Isolation -To avoid conflicts when both runtime and package env refs are present in the same container, `packageService` envs use prefixed env names: +To avoid conflicts when both runtime and package env refs are present in the same container, `pulsarPackageService` envs use prefixed env names: - Prefix: `PACKAGE_` - Examples: `PACKAGE_webServiceURL`, `PACKAGE_clientAuthenticationParameters` @@ -79,7 +79,7 @@ Command generation for package download uses these prefixed env names. ### Volumes and VolumeMounts -When `packageService` is provided, required TLS/OAuth2 mounts for package download are added with dedicated mount paths: +When `pulsarPackageService` is provided, required TLS/OAuth2 mounts for package download are added with dedicated mount paths: - OAuth2: `/etc/oauth2-package-service` - TLS: `/etc/tls/pulsar-functions-package-service` @@ -97,9 +97,9 @@ Both modes are supported: ## Backward Compatibility -- Existing manifests without `packageService` behave exactly as before. +- Existing manifests without `pulsarPackageService` behave exactly as before. - Existing required `spec.pulsar` contract remains unchanged. -- Existing command paths and runtime behavior are preserved unless `packageService` is set. +- Existing command paths and runtime behavior are preserved unless `pulsarPackageService` is set. ## Testing @@ -108,7 +108,7 @@ Both modes are supported: Updated/added tests in `controllers/spec` for: - New signatures and fallback behavior -- `packageService` download command env selection +- `pulsarPackageService` download command env selection - Runtime container package-service env/mount injection ### Integration Tests @@ -119,7 +119,7 @@ Added new oauth2 integration case: Coverage: -- Deploy function with both `pulsar` and `packageService`. +- Deploy function with both `pulsar` and `pulsarPackageService`. - Verify StatefulSet has package-service-specific env prefix and mounts. - Verify end-to-end message processing succeeds. - Reuses the same Pulsar cluster for package provider (no extra cluster). @@ -150,8 +150,8 @@ Mitigation: ## Operational Notes -- Users can migrate incrementally by adding `packageService` only where needed. -- If `packageService` is removed, the system transparently falls back to `spec.pulsar`. +- Users can migrate incrementally by adding `pulsarPackageService` only where needed. +- If `pulsarPackageService` is removed, the system transparently falls back to `spec.pulsar`. ## Conclusion diff --git a/go.mod b/go.mod index ee976d333..442bc52d9 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/streamnative/function-mesh -go 1.24.13 +go 1.25.8 require ( github.com/apache/pulsar-client-go v0.17.0 @@ -12,7 +12,7 @@ require ( github.com/streamnative/function-mesh/api v0.0.0 github.com/streamnative/pulsarctl v0.6.0 github.com/stretchr/testify v1.11.1 - google.golang.org/protobuf v1.36.6 + google.golang.org/protobuf v1.36.10 gotest.tools v2.2.0+incompatible k8s.io/api v0.32.3 k8s.io/apimachinery v0.32.3 @@ -95,17 +95,17 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/net v0.39.0 // indirect - golang.org/x/oauth2 v0.29.0 // indirect - golang.org/x/sync v0.13.0 // indirect + golang.org/x/net v0.48.0 // indirect + golang.org/x/oauth2 v0.34.0 // indirect + golang.org/x/sync v0.19.0 // indirect golang.org/x/sys v0.40.0 // indirect - golang.org/x/term v0.31.0 // indirect - golang.org/x/text v0.24.0 // indirect + golang.org/x/term v0.38.0 // indirect + golang.org/x/text v0.32.0 // indirect golang.org/x/time v0.10.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect - google.golang.org/grpc v1.71.1 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect + google.golang.org/grpc v1.79.3 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index d27cfc218..cae75f652 100644 --- a/go.sum +++ b/go.sum @@ -50,8 +50,8 @@ github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/ github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-jose/go-jose/v4 v4.0.5 h1:M6T8+mKZl/+fNNuFHvGIzDz7BTLQPIounk/b9dw3AaE= -github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA= +github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs= +github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -256,30 +256,28 @@ go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= -golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w= -golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk= +golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= -golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= -golang.org/x/oauth2 v0.29.0 h1:WdYw2tdTK1S8olAzWHdgeqfy+Mtm9XNhv/xJsY65d98= -golang.org/x/oauth2 v0.29.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= +golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= +golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= +golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= -golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -293,12 +291,12 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= -golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= +golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q= +golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= -golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= +golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4= golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -306,28 +304,30 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= +golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 h1:GVIKPyP/kLIyVOgOnTwFOrvQaQUzOzGMCxgFUOEmm24= -google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422/go.mod h1:b6h1vNKhxaSoEI+5jc3PJUCustfli/mRab7295pY7rw= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= -google.golang.org/grpc v1.71.1 h1:ffsFWr7ygTUscGPI0KKK6TLrGz0476KUvvsbqWK0rPI= -google.golang.org/grpc v1.71.1/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 h1:fCvbg86sFXwdrl5LgVcTEvNC+2txB5mgROGmRL5mrls= +google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 h1:gRkg/vSppuSQoDjxyiGfN4Upv/h/DQmIR10ZU8dh4Ww= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE= +google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= +google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/images/samples/go-function-samples/Dockerfile b/images/samples/go-function-samples/Dockerfile index 945f5b42e..0a3c0325c 100644 --- a/images/samples/go-function-samples/Dockerfile +++ b/images/samples/go-function-samples/Dockerfile @@ -1,5 +1,5 @@ ARG PULSAR_IMAGE_TAG -FROM golang:1.24.13-trixie as builder +FROM golang:1.25.8-trixie as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/images/samples/go-function-samples/func/go.mod b/images/samples/go-function-samples/func/go.mod index 9aace4ec8..1f6e83f99 100644 --- a/images/samples/go-function-samples/func/go.mod +++ b/images/samples/go-function-samples/func/go.mod @@ -1,6 +1,6 @@ module github.com/apache/pulsar/pulsar-function-go/examples -go 1.24.13 +go 1.25.8 require github.com/apache/pulsar/pulsar-function-go v0.0.0-20250430085326-611dc3f360b5 diff --git a/manifests/crd.yaml b/manifests/crd.yaml index 411c1f735..586a99fee 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -3584,90 +3584,6 @@ spec: typeClassName: type: string type: object - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object persistentVolumeClaimRetentionPolicy: properties: whenDeleted: @@ -6924,6 +6840,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -7592,90 +7592,6 @@ spec: negativeAckRedeliveryDelayMs: format: int32 type: integer - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object pod: properties: affinity: @@ -10925,14 +10841,98 @@ spec: tlsSecret: type: string type: object - python: + pulsarPackageService: properties: - log: + authConfig: properties: - format: - enum: - - json - - text + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object + python: + properties: + log: + properties: + format: + enum: + - json + - text type: string javaLog4JConfigFileType: enum: @@ -11340,90 +11340,6 @@ spec: typeClassName: type: string type: object - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object pod: properties: affinity: @@ -14673,6 +14589,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -15243,90 +15243,6 @@ spec: typeClassName: type: string type: object - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object persistentVolumeClaimRetentionPolicy: properties: whenDeleted: @@ -18583,6 +18499,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -19323,97 +19323,13 @@ spec: format: int32 minimum: 0 type: integer - name: - type: string - namespace: - type: string - negativeAckRedeliveryDelayMs: - format: int32 - type: integer - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object + name: + type: string + namespace: + type: string + negativeAckRedeliveryDelayMs: + format: int32 + type: integer pod: properties: affinity: @@ -22663,6 +22579,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: @@ -23157,90 +23157,6 @@ spec: typeClassName: type: string type: object - packageService: - properties: - authConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - authSecret: - type: string - cleanupAuthConfig: - properties: - genericAuth: - properties: - clientAuthenticationParameters: - type: string - clientAuthenticationPlugin: - type: string - required: - - clientAuthenticationParameters - - clientAuthenticationPlugin - type: object - oauth2Config: - properties: - audience: - type: string - issuerUrl: - type: string - keySecretKey: - type: string - keySecretName: - type: string - scope: - type: string - required: - - audience - - issuerUrl - - keySecretKey - - keySecretName - type: object - type: object - pulsarConfig: - type: string - tlsConfig: - properties: - allowInsecure: - type: boolean - certSecretKey: - type: string - certSecretName: - type: string - enabled: - type: boolean - hostnameVerification: - type: boolean - type: object - tlsSecret: - type: string - type: object pod: properties: affinity: @@ -26490,6 +26406,90 @@ spec: tlsSecret: type: string type: object + pulsarPackageService: + properties: + authConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + authSecret: + type: string + cleanupAuthConfig: + properties: + genericAuth: + properties: + clientAuthenticationParameters: + type: string + clientAuthenticationPlugin: + type: string + required: + - clientAuthenticationParameters + - clientAuthenticationPlugin + type: object + oauth2Config: + properties: + audience: + type: string + issuerUrl: + type: string + keySecretKey: + type: string + keySecretName: + type: string + scope: + type: string + required: + - audience + - issuerUrl + - keySecretKey + - keySecretName + type: object + type: object + pulsarConfig: + type: string + tlsConfig: + properties: + allowInsecure: + type: boolean + certSecretKey: + type: string + certSecretName: + type: string + enabled: + type: boolean + hostnameVerification: + type: boolean + type: object + tlsSecret: + type: string + type: object python: properties: log: diff --git a/pkg/webhook/function_webhook.go b/pkg/webhook/function_webhook.go index efaf910ea..4cd874b90 100644 --- a/pkg/webhook/function_webhook.go +++ b/pkg/webhook/function_webhook.go @@ -312,7 +312,7 @@ func (webhook *FunctionWebhook) ValidateCreate(ctx context.Context, obj runtime. if fieldErr != nil { allErrs = append(allErrs, fieldErr) } - fieldErr = validatePackageService(r.Spec.PackageService) + fieldErr = validatePulsarPackageService(r.Spec.PulsarPackageService) if fieldErr != nil { allErrs = append(allErrs, fieldErr) } diff --git a/pkg/webhook/sink_webhook.go b/pkg/webhook/sink_webhook.go index 8a4a2b436..2998a585c 100644 --- a/pkg/webhook/sink_webhook.go +++ b/pkg/webhook/sink_webhook.go @@ -233,7 +233,7 @@ func (webhook *SinkWebhook) ValidateCreate(ctx context.Context, obj runtime.Obje if fieldErr != nil { allErrs = append(allErrs, fieldErr) } - fieldErr = validatePackageService(r.Spec.PackageService) + fieldErr = validatePulsarPackageService(r.Spec.PulsarPackageService) if fieldErr != nil { allErrs = append(allErrs, fieldErr) } diff --git a/pkg/webhook/source_webhook.go b/pkg/webhook/source_webhook.go index 57418860d..712719887 100644 --- a/pkg/webhook/source_webhook.go +++ b/pkg/webhook/source_webhook.go @@ -223,7 +223,7 @@ func (webhook *SourceWebhook) ValidateCreate(ctx context.Context, obj runtime.Ob if fieldErr != nil { allErrs = append(allErrs, fieldErr) } - fieldErr = validatePackageService(r.Spec.PackageService) + fieldErr = validatePulsarPackageService(r.Spec.PulsarPackageService) if fieldErr != nil { allErrs = append(allErrs, fieldErr) } diff --git a/pkg/webhook/validate.go b/pkg/webhook/validate.go index 3130c2376..ed4495c03 100644 --- a/pkg/webhook/validate.go +++ b/pkg/webhook/validate.go @@ -404,13 +404,13 @@ func validateMessaging(messaging *v1alpha1.Messaging) *field.Error { return nil } -func validatePackageService(packageService *v1alpha1.PulsarMessaging) *field.Error { +func validatePulsarPackageService(packageService *v1alpha1.PulsarMessaging) *field.Error { if packageService == nil { return nil } if packageService.PulsarConfig == "" { - return field.Invalid(field.NewPath("spec").Child("packageService"), packageService, - "packageService.pulsarConfig needs to be set") + return field.Invalid(field.NewPath("spec").Child("pulsarPackageService"), packageService, + "pulsarPackageService.pulsarConfig needs to be set") } return nil } diff --git a/redhat.Dockerfile b/redhat.Dockerfile index ad866708c..ab0613ab7 100644 --- a/redhat.Dockerfile +++ b/redhat.Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.24.13-trixie as builder +FROM golang:1.25.8-trixie as builder WORKDIR /workspace/api COPY api/ .