diff --git a/CODEOWNERS b/CODEOWNERS index d573012bb6ad..d44fb460de03 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -30,11 +30,9 @@ /installation @kyma-project/Jellyfish /installation/resources/crds/compass-runtime-agent @kyma-project/Framefrog -/installation/resources/crds/eventing @kyma-project/eventing /installation/resources/crds/istio @kyma-project/goat /resources/compass-runtime-agent @kyma-project/Framefrog -/resources/eventing @kyma-project/eventing /resources/istio @kyma-project/goat # Fast Integration Tests diff --git a/README.md b/README.md index 5242c03d8557..ed0369357c1c 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,12 @@ ## Overview -**Kyma** `/kee-ma/` is an application runtime that provides you a flexible and easy way to connect, extend, and customize your applications in the cloud-native world of Kubernetes. +**Kyma** `/kee-ma/` is an application runtime that provides you a flexible and easy way to connect, extend, and customize your applications in the cloud-native world of Kubernetes. -Out of the box, Kyma offers various functionalities, such as: +Out of the box, Kyma offers various functionalities, such as: - [Serverless](https://kyma-project.io/#/serverless-manager/user/README) development platform to run lightweight Functions in a cost-efficient and scalable way - [System connectivity](https://kyma-project.io/#/01-overview/application-connectivity/README) that provides endpoint to securely register Events and APIs of external applications -- [Eventing](https://kyma-project.io/#/01-overview/eventing/README) that provides messaging channel to receive events, enrich them, and trigger business flows using Functions or services - [Istio](https://kyma-project.io/#/istio/user/00-overview/README) for service-to-service communication and proxying - [Service Management](https://kyma-project.io/#/01-overview/service-management/README) to use the built-in cloud services from such cloud providers as GCP, Azure, and AWS - Secure API exposure diff --git a/components/eventing-controller/Makefile b/components/eventing-controller/Makefile index 1cb8229a5d3b..e77272467aed 100644 --- a/components/eventing-controller/Makefile +++ b/components/eventing-controller/Makefile @@ -121,9 +121,6 @@ OS := $(shell uname) controller-gen-local: ## Download controller-gen locally if necessary. GOBIN=$(PROJECT_DIR)/bin/$(OS) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) -path-to-referenced-charts: - @echo "resources/eventing" - ##@ CRD copy-crds: manifests-local ## copy Eventing CRDs to installation/eventing diff --git a/hack/table-gen/Makefile b/hack/table-gen/Makefile index 44b63e861474..73975ed389f1 100644 --- a/hack/table-gen/Makefile +++ b/hack/table-gen/Makefile @@ -5,17 +5,6 @@ generate: cra-docs eventing-docs apix-docs cra-docs: go run main.go --crd-filename ../../installation/resources/crds/compass-runtime-agent/compass-connection.crd.yaml --md-filename ../../docs/05-technical-reference/00-custom-resources/ra-01-compassconnection.md -.PHONY: eventing-subscription -eventing-subscription: - go run main.go --crd-filename ../../installation/resources/crds/eventing/subscriptions.eventing.kyma-project.io.crd.yaml --md-filename ../../docs/05-technical-reference/00-custom-resources/evnt-01-subscription.md - -.PHONY: eventing-backend -eventing-backend: - go run main.go --crd-filename ../../installation/resources/crds/eventing/eventingbackends.eventing.kyma-project.io.crd.yaml --md-filename ../../docs/05-technical-reference/00-custom-resources/evnt-02-eventingbackend.md - -.PHONY: eventing-docs -eventing-docs: eventing-subscription eventing-backend - .PHONY: apix-docs apix-docs: - go run main.go --crd-filename ../../installation/resources/crds/api-gateway/apirules.gateway.crd.yaml --md-filename ../../docs/05-technical-reference/00-custom-resources/apix-01-apirule.md \ No newline at end of file + go run main.go --crd-filename ../../installation/resources/crds/api-gateway/apirules.gateway.crd.yaml --md-filename ../../docs/05-technical-reference/00-custom-resources/apix-01-apirule.md diff --git a/installation/resources/components.yaml b/installation/resources/components.yaml index c48b9d008b1d..5964b3aec8a7 100644 --- a/installation/resources/components.yaml +++ b/installation/resources/components.yaml @@ -3,5 +3,3 @@ defaultNamespace: kyma-system prerequisites: - name: "istio" namespace: "istio-system" -components: - - name: "eventing" diff --git a/installation/resources/crds/eventing/eventingbackends.eventing.kyma-project.io.crd.yaml b/installation/resources/crds/eventing/eventingbackends.eventing.kyma-project.io.crd.yaml deleted file mode 100644 index eec8a4f5431a..000000000000 --- a/installation/resources/crds/eventing/eventingbackends.eventing.kyma-project.io.crd.yaml +++ /dev/null @@ -1,103 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.1 - creationTimestamp: null - name: eventingbackends.eventing.kyma-project.io -spec: - group: eventing.kyma-project.io - names: - kind: EventingBackend - listKind: EventingBackendList - plural: eventingbackends - singular: eventingbackend - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.backendType - name: Backend - type: string - - jsonPath: .status.eventingReady - name: EventingReady - type: boolean - - jsonPath: .status.conditions[?(@.type=="Subscription Controller Ready")].status - name: SubscriptionControllerReady - type: string - - jsonPath: .status.conditions[?(@.type=="Publisher Proxy Ready")].status - name: PublisherProxyReady - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: EventingBackend is the Schema for the eventingbackends API. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: EventingBackendSpec defines the desired state of EventingBackend. - type: object - status: - description: EventingBackendStatus defines the observed state of EventingBackend. - properties: - backendType: - description: Specifies the backend type used. The value is either - `BEB`, or `NATS`. - enum: - - BEB - - NATS - type: string - bebSecretName: - description: Name of the Secret containing BEB access tokens, required - for BEB only. - type: string - bebSecretNamespace: - description: Namespace of the Secret containing BEB access tokens, - required for BEB only. - type: string - conditions: - description: Defines the status of the Controller and the EPP. - items: - properties: - lastTransitionTime: - description: Defines the date of the last condition status change. - format: date-time - type: string - message: - description: Provides more details about the condition status - change. - type: string - reason: - description: Defines the reason for the condition status change. - type: string - status: - description: Status of the condition. The value is either `True`, - `False`, or `Unknown`. - type: string - type: - description: Short description of the condition. - type: string - required: - - status - type: object - type: array - eventingReady: - description: Defines the overall Backend status. - type: boolean - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/installation/resources/crds/eventing/subscriptions.eventing.kyma-project.io.crd.yaml b/installation/resources/crds/eventing/subscriptions.eventing.kyma-project.io.crd.yaml deleted file mode 100644 index eeef8c34409a..000000000000 --- a/installation/resources/crds/eventing/subscriptions.eventing.kyma-project.io.crd.yaml +++ /dev/null @@ -1,481 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.1 - name: subscriptions.eventing.kyma-project.io -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: eventing-controller-webhook-service - namespace: kyma-system - path: /convert - conversionReviewVersions: - - v1 - group: eventing.kyma-project.io - names: - kind: Subscription - listKind: SubscriptionList - plural: subscriptions - singular: subscription - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.ready - name: Ready - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.cleanEventTypes - name: Clean Event Types - type: string - deprecated: true - deprecationWarning: The v1alpha1 API version is deprecated as of Kyma 2.14.X. - name: v1alpha1 - schema: - openAPIV3Schema: - description: Subscription is the Schema for the subscriptions API. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: SubscriptionSpec defines the desired state of Subscription. - properties: - config: - description: Defines additional configuration for the active backend. - properties: - maxInFlightMessages: - description: Defines how many not-ACKed messages can be in flight - simultaneously. - minimum: 1 - type: integer - type: object - filter: - description: Defines which events will be sent to the sink. - properties: - dialect: - description: Contains a `URI-reference` to the CloudEvent filter - dialect. See [here](https://github.com/cloudevents/spec/blob/main/subscriptions/spec.md#3241-filter-dialects) - for more details. - type: string - filters: - items: - description: Defines the BEB filter element as a combination - of two CE filter elements. - properties: - eventSource: - description: Defines the source of the CE filter. - properties: - property: - description: Defines the property of the filter. - type: string - type: - description: Defines the type of the filter. - type: string - value: - description: Defines the value of the filter. - type: string - required: - - property - - value - type: object - eventType: - description: Defines the type of the CE filter. - properties: - property: - description: Defines the property of the filter. - type: string - type: - description: Defines the type of the filter. - type: string - value: - description: Defines the value of the filter. - type: string - required: - - property - - value - type: object - required: - - eventSource - - eventType - type: object - type: array - required: - - filters - type: object - id: - description: Unique identifier of the Subscription, read-only. - type: string - protocol: - description: Defines the CE protocol specification implementation. - type: string - protocolsettings: - description: Defines the CE protocol settings specification implementation. - properties: - contentMode: - description: Defines the content mode for eventing based on BEB. - The value is either `BINARY`, or `STRUCTURED`. - type: string - exemptHandshake: - description: Defines if the exempt handshake for eventing is based - on BEB. - type: boolean - qos: - description: Defines the quality of service for eventing based - on BEB. - type: string - webhookAuth: - description: Defines the Webhook called by an active subscription - on BEB. - properties: - clientId: - description: Defines the clientID for OAuth2. - type: string - clientSecret: - description: Defines the Client Secret for OAuth2. - type: string - grantType: - description: Defines the grant type for OAuth2. - type: string - scope: - description: Defines the scope for OAuth2. - items: - type: string - type: array - tokenUrl: - description: Defines the token URL for OAuth2. - type: string - type: - description: Defines the authentication type. - type: string - required: - - clientId - - clientSecret - - grantType - - tokenUrl - type: object - type: object - sink: - description: Kubernetes Service that should be used as a target for - the events that match the Subscription. Must exist in the same Namespace - as the Subscription. - type: string - required: - - filter - - sink - type: object - status: - description: SubscriptionStatus defines the observed state of the Subscription. - properties: - apiRuleName: - description: Defines the name of the APIRule which is used by the - Subscription. - type: string - cleanEventTypes: - description: CleanEventTypes defines the filter's event types after - cleanup to use it with the configured backend. - items: - type: string - type: array - conditions: - description: Current state of the Subscription. - items: - properties: - lastTransitionTime: - description: Defines the date of the last condition status change. - format: date-time - type: string - message: - description: Provides more details about the condition status - change. - type: string - reason: - description: Defines the reason for the condition status change. - type: string - status: - description: Status of the condition. The value is either `True`, - `False`, or `Unknown`. - type: string - type: - description: Short description of the condition. - type: string - required: - - status - type: object - type: array - config: - description: Defines the configurations that have been applied to - the eventing backend when creating this Subscription. - properties: - maxInFlightMessages: - description: Defines how many not-ACKed messages can be in flight - simultaneously. - minimum: 1 - type: integer - type: object - emsSubscriptionStatus: - description: Defines the status of the Subscription in EventMesh. - properties: - lastFailedDelivery: - description: Timestamp of the last failed delivery. - type: string - lastFailedDeliveryReason: - description: Reason for the last failed delivery. - type: string - lastSuccessfulDelivery: - description: Timestamp of the last successful delivery. - type: string - subscriptionStatus: - description: Status of the Subscription as reported by EventMesh. - type: string - subscriptionStatusReason: - description: Reason for the current status. - type: string - type: object - emshash: - description: Defines the checksum for the Subscription in EventMesh. - format: int64 - type: integer - ev2hash: - description: Defines the checksum for the Subscription custom resource. - format: int64 - type: integer - externalSink: - description: Defines the webhook URL which is used by EventMesh to - trigger subscribers. - type: string - failedActivation: - description: Defines the reason if a Subscription failed activation - in EventMesh. - type: string - ready: - description: Overall readiness of the Subscription. - type: boolean - required: - - cleanEventTypes - - ready - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .status.ready - name: Ready - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha2 - schema: - openAPIV3Schema: - description: Subscription is the Schema for the subscriptions API. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Defines the desired state of the Subscription. - properties: - config: - additionalProperties: - type: string - description: Map of configuration options that will be applied on - the backend. - type: object - id: - description: Unique identifier of the Subscription, read-only. - type: string - sink: - description: Kubernetes Service that should be used as a target for - the events that match the Subscription. Must exist in the same Namespace - as the Subscription. - type: string - source: - description: Defines the origin of the event. - type: string - typeMatching: - description: 'Defines how types should be handled.
- `standard`: - backend-specific logic will be applied to the configured source - and types.
- `exact`: no further processing will be applied - to the configured source and types.' - type: string - types: - description: List of event types that will be used for subscribing - on the backend. - items: - type: string - type: array - required: - - sink - - source - - types - type: object - status: - description: SubscriptionStatus defines the observed state of Subscription. - properties: - backend: - description: Backend-specific status which is applicable to the active - backend only. - properties: - apiRuleName: - description: Name of the APIRule which is used by the Subscription. - type: string - emsSubscriptionStatus: - description: Status of the Subscription as reported by EventMesh. - properties: - lastFailedDelivery: - description: Timestamp of the last failed delivery. - type: string - lastFailedDeliveryReason: - description: Reason for the last failed delivery. - type: string - lastSuccessfulDelivery: - description: Timestamp of the last successful delivery. - type: string - status: - description: Status of the Subscription as reported by the - backend. - type: string - statusReason: - description: Reason for the current status. - type: string - type: object - emsTypes: - description: List of mappings from event type to EventMesh compatible - types. Used only with EventMesh as the backend. - items: - properties: - eventMeshType: - description: Event type that is used on the EventMesh backend. - type: string - originalType: - description: Event type that was originally used to subscribe. - type: string - required: - - eventMeshType - - originalType - type: object - type: array - emshash: - description: Hash used to identify an EventMesh Subscription retrieved - from the server without the WebhookAuth config. - format: int64 - type: integer - ev2hash: - description: Checksum for the Subscription custom resource. - format: int64 - type: integer - eventMeshLocalHash: - description: Hash used to identify an EventMesh Subscription posted - to the server without the WebhookAuth config. - format: int64 - type: integer - externalSink: - description: Webhook URL used by EventMesh to trigger subscribers. - type: string - failedActivation: - description: Provides the reason if a Subscription failed activation - in EventMesh. - type: string - types: - description: List of event type to consumer name mappings for - the NATS backend. - items: - properties: - consumerName: - description: Name of the JetStream consumer created for - the event type. - type: string - originalType: - description: Event type that was originally used to subscribe. - type: string - required: - - originalType - type: object - type: array - webhookAuthHash: - description: Hash used to identify the WebhookAuth of an EventMesh - Subscription existing on the server. - format: int64 - type: integer - type: object - conditions: - description: Current state of the Subscription. - items: - properties: - lastTransitionTime: - description: Defines the date of the last condition status change. - format: date-time - type: string - message: - description: Provides more details about the condition status - change. - type: string - reason: - description: Defines the reason for the condition status change. - type: string - status: - description: Status of the condition. The value is either `True`, - `False`, or `Unknown`. - type: string - type: - description: Short description of the condition. - type: string - required: - - status - type: object - type: array - ready: - description: Overall readiness of the Subscription. - type: boolean - types: - description: List of event types after cleanup for use with the configured - backend. - items: - properties: - cleanType: - description: Event type after it was cleaned up from backend - compatible characters. - type: string - originalType: - description: Event type as specified in the Subscription spec. - type: string - required: - - cleanType - - originalType - type: object - type: array - required: - - ready - - types - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/resources/eventing/.helmignore b/resources/eventing/.helmignore deleted file mode 100644 index 0e8a0eb36f4c..000000000000 --- a/resources/eventing/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/resources/eventing/Chart.yaml b/resources/eventing/Chart.yaml deleted file mode 100644 index a5cde751d4df..000000000000 --- a/resources/eventing/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -name: eventing -description: Kyma Component 'eventing' -version: 0.1.0 -home: https://kyma-project.io -icon: https://github.com/kyma-project/kyma/blob/main/logo.png?raw=true diff --git a/resources/eventing/README.md b/resources/eventing/README.md deleted file mode 100644 index 100787e0cc6f..000000000000 --- a/resources/eventing/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# Eventing Chart - -This Helm chart contains all components required for eventing in Kyma: - -Components: -- publisher-proxy -- controller -- nats-server - -## Publisher Proxy - -This component receives legacy and Cloud Event publishing requests from the cluster workloads (microservice or Serverless functions) and redirects them to the Enterprise Messaging Service Cloud Event Gateway. It also fetches a list of subscriptions for a connected application. Click [here](../../components/event-publisher-proxy) for more details. - -## Controller - -This component manages the internal infrastructure in order to receive an event for all subscriptions handled by NATS or Business Event Bus (BEB)(based on the configuration). - -## NATS Server - -This component manages NATS server which serves as an eventing platform for Kyma eventing. - -## Installation - -You can install this Helm chart using either Helm or Kyma CLI. - -### Using Helm 3: - - -```bash -# Install subscriptions.eventing.kyma-project.io CRD -kubectl apply -f installation/resources/crds/eventing/subscriptions.eventing.kyma-project.io.crd.yaml -kubectl apply -f installation/resources/crds/eventing/eventingbackends.eventing.kyma-project.io.crd.yaml - -$ helm install \ - -n kyma-system \ - eventing . -``` - -### Using Kyma CLI: - -```bash -kyma deploy --source=local --workspace --component=eventing -``` - -### Configuring NATS JetStream persistence - -The persistence used for the stream in the JetStream backend is configurable using the Eventing Helm chart. By default, you can use the `memory` storage type in the evaluation profile and `file` in the production profile. You can customize it further by passing different values to the `kyma deploy` command. For example, to install the production profile with the `memory` storage type of `2Gi` use: - -```bash -kyma deploy --profile production \ - --value global.jetstream.storage=memory \ - --value eventing.nats.nats.jetstream.memStorage.size=2Gi -``` diff --git a/resources/eventing/charts/controller/.helmignore b/resources/eventing/charts/controller/.helmignore deleted file mode 100644 index 0e8a0eb36f4c..000000000000 --- a/resources/eventing/charts/controller/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/resources/eventing/charts/controller/Chart.yaml b/resources/eventing/charts/controller/Chart.yaml deleted file mode 100644 index a5e2a20c8f21..000000000000 --- a/resources/eventing/charts/controller/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v2 -name: controller -description: A Helm chart for eventing-controller -type: application -version: 0.1.0 diff --git a/resources/eventing/charts/controller/templates/_helpers.tpl b/resources/eventing/charts/controller/templates/_helpers.tpl deleted file mode 100644 index 2403a425f6bc..000000000000 --- a/resources/eventing/charts/controller/templates/_helpers.tpl +++ /dev/null @@ -1,74 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "controller.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "controller.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "controller.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "controller.labels" -}} -helm.sh/chart: {{ include "controller.chart" . }} -{{ include "controller.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "controller.selectorLabels" -}} -app.kubernetes.io/name: {{ include "controller.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -kyma-project.io/dashboard: eventing -{{- end }} - -{{/* -Selector labels for peerauthentication -*/}} -{{- define "controller.peerAuth.selectorLabels" -}} -app.kubernetes.io/name: {{ include "controller.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create eventing backend name. -*/}} -{{- define "eventing.backend.name" -}} -{{- printf "%s" .Values.eventingBackend.name }} -{{- end }} - -{{/* --Nats server service Name --*/}} -{{- define "controller.natsServer.url" -}} -{{- printf "%s-nats.%s.svc.cluster.local" .Release.Name .Release.Namespace | trunc 63 | trimSuffix "-" }} -{{- end }} diff --git a/resources/eventing/charts/controller/templates/busola-extension.yaml b/resources/eventing/charts/controller/templates/busola-extension.yaml deleted file mode 100644 index f0bb09d58794..000000000000 --- a/resources/eventing/charts/controller/templates/busola-extension.yaml +++ /dev/null @@ -1,149 +0,0 @@ -kind: ConfigMap -apiVersion: v1 -metadata: - name: subscriptions - namespace: kube-public - labels: - app.kubernetes.io/name: subscriptions - busola.io/extension: resource - busola.io/extension-version: '0.5' -data: - general: |- - resource: - kind: Subscription - group: eventing.kyma-project.io - version: v1alpha2 - name: Subscriptions - category: Configuration - scope: namespace - description: >- - {{"{{[Subscription](https://kyma-project.io/docs/kyma/latest/05-technical-reference/00-custom-resources/evnt-01-subscription#documentation-content)}}"}} is used to subscribe to events. - urlPath: subscriptions - details: |- - header: - - name: status.conditions.status - source: 'status.ready = false ? "error" : "ready"' - widget: Badge - description: status.conditions.message - - name: spec.typeMatching - source: spec.typeMatching - - name: spec.source - source: spec.source - - name: spec.sink - source: spec.sink - widget: ResourceLink - resource: - name: '$substringBefore($substringAfter(spec.sink, "http://"), ".")' - namespace: $root.metadata.namespace - kind: "'Service'" - body: - - source: status.conditions - widget: Table - name: status.conditions - children: - - source: '$item.type' - name: status.conditions.type - - source: '$item.status' - widget: Badge - name: status.conditions.status - - source: '$item.reason' - name: status.conditions.reason - - source: '$item.message' - name: status.conditions.message - - source: '$readableTimestamp($item.lastTransitionTime)' - name: status.conditions.lastTransitionTime - - name: spec.types - source: spec.types - widget: Table - children: - - name: Type - search: true - source: '$item' - sort: false - - widget: EventList - filter: "$matchEvents($$, $root.kind, $root.metadata.name)" - name: events - defaultType: NORMAL - hideInvolvedObjects: true - form: |- - - path: spec.config - widget: KeyValuePair - defaultExpanded: false - - path: spec.types - simple: true - widget: SimpleList - defaultExpanded: true - children: - - path: '[]' - simple: true - - simple: true - type: string - var: service - name: Service - widget: Resource - resource: - kind: Service - version: v1 - scope: namespace - trigger: [sink] - - path: spec.sink - name: spec.sink - simple: true - inputInfo: inputInfo.sink - placeholder: placeholder.sink - subscribe: - sink: '"http://" & $service & "." & $root.metadata.namespace & ".svc.cluster.local"' - - path: spec.typeMatching - simple: true - enum: - - standard - - exact - required: true - - path: spec.source - name: spec.source - simple: true - required: true - visibility: "spec.typeMatching = 'standard'" - widget: Resource - resource: - kind: Application - group: applicationconnector.kyma-project.io - version: v1alpha1 - list: |- - - name: status.conditions.status - source: 'status.ready = false ? "error" : "ready"' - widget: Badge - description: status.conditions.message - presets: |- - - name: Default Type Matching - default: true - value: - spec: - typeMatching: standard - translations: |- - en: - inputInfo.sink: Sink structure, 'http://{SERVICE}.{NAMESPACE}.svc.cluster.local' - inputInfo.eventType: Event Type structure, 'sap.kyma.custom.{APP}.{EVENT.NAME}.{VERSION}' - events: Events - placeholder.eventType: Enter the event type, for example, sap.kyma.custom.test-app.order.cancelled.v1 - placeholder.sink: Enter the sink, for example, http://service.default.svc.cluster.local - spec.filters: Filters - spec.filter.eventType: Event Type - spec.filter.eventSource: Event Source - spec.filter.event.property: Property - spec.filter.event.type: Type - spec.filter.event.value: Value - spec.types: Types - spec.source: Source - spec.typeMatching: Type Matching - spec.sink: Sink - spec.service: Service - spec.sink.controlledBy: Controlled By - status.cleanEventTypes: Event Types - status.conditions: Conditions - status.conditions.lastTransitionTime: Last Transition - status.conditions.reason: Reason - status.conditions.status: Status - status.conditions.type: Type - status.conditions.message: Message - status.type: Type diff --git a/resources/eventing/charts/controller/templates/clusterrole.yaml b/resources/eventing/charts/controller/templates/clusterrole.yaml deleted file mode 100644 index 54b57939b6bb..000000000000 --- a/resources/eventing/charts/controller/templates/clusterrole.yaml +++ /dev/null @@ -1,115 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "controller.fullname" . }} - labels: {{- include "controller.labels" . | nindent 4 }} -rules: -- apiGroups: - - "" - resources: - - services - - pods - verbs: - - list - - get - - watch -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch -- apiGroups: - - eventing.kyma-project.io - resources: - - subscriptions - verbs: - - get - - list - - watch - - patch - - update -- apiGroups: - - eventing.kyma-project.io - resources: - - subscriptions/status - verbs: - - get - - patch - - update -- apiGroups: - - gateway.kyma-project.io - resources: - - apirules - verbs: - - get - - list - - watch - - patch - - update - - create - - delete -- apiGroups: - - applicationconnector.kyma-project.io - resources: - - applications - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - secrets - verbs: - - get - - list - - patch - - update - - watch - - create - - delete -- apiGroups: - - eventing.kyma-project.io - resources: - - eventingbackends - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - eventing.kyma-project.io - resources: - - eventingbackends/status - verbs: - - get - - patch - - update -- apiGroups: - - apps - resources: - - deployments - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - admissionregistration.k8s.io - resources: - - mutatingwebhookconfigurations - - validatingwebhookconfigurations - verbs: - - get - - list - - patch - - update - - watch diff --git a/resources/eventing/charts/controller/templates/clusterrolebinding.yaml b/resources/eventing/charts/controller/templates/clusterrolebinding.yaml deleted file mode 100644 index b27f1b8a341a..000000000000 --- a/resources/eventing/charts/controller/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ include "controller.fullname" .}}{{ .Values.clusterRoleBindingSuffix }} - labels: {{- include "controller.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ include "controller.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ include "controller.fullname" . }} - namespace: {{ .Release.Namespace }} diff --git a/resources/eventing/charts/controller/templates/deployment.yaml b/resources/eventing/charts/controller/templates/deployment.yaml deleted file mode 100644 index 217e2cab00e7..000000000000 --- a/resources/eventing/charts/controller/templates/deployment.yaml +++ /dev/null @@ -1,147 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "controller.fullname" . }} - labels: {{- include "controller.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: {{- include "controller.selectorLabels" . | nindent 6 }} - strategy: - type: RollingUpdate - template: - metadata: - labels: {{- include "controller.selectorLabels" . | nindent 8 }} - annotations: - traffic.sidecar.istio.io/excludeInboundPorts: {{ .Values.webhook.targetPort | quote }} - spec: - serviceAccountName: {{ include "controller.fullname" . }} - terminationGracePeriodSeconds: 10 - securityContext: {{- toYaml .Values.global.podSecurityContext | nindent 8 }} - containers: - - image: "{{include "imageurl" (dict "reg" .Values.global.containerRegistry "img" .Values.global.images.eventing_controller) }}" - imagePullPolicy: "{{ .Values.global.images.eventing_controller.pullPolicy }}" - name: controller - env: - - name: NATS_URL - value: {{ include "controller.natsServer.url" . }} - - name: EVENT_TYPE_PREFIX - valueFrom: - configMapKeyRef: - name: {{ .Values.global.configMap.name }} - key: {{ .Values.global.configMap.keys.eventTypePrefix }} - - name: DOMAIN - value: {{ .Values.global.domainName }} - - name: WEBHOOK_TOKEN_ENDPOINT - value: https://oauth2.{{ .Values.global.domainName }}/oauth2/token - - name: PUBLISHER_REQUESTS_CPU - value: {{ .Values.publisherProxy.resources.requests.cpu }} - - name: PUBLISHER_REQUESTS_MEMORY - value: {{ .Values.publisherProxy.resources.requests.memory }} - - name: PUBLISHER_LIMITS_CPU - value: {{ .Values.publisherProxy.resources.limits.cpu }} - - name: PUBLISHER_LIMITS_MEMORY - value: {{ .Values.publisherProxy.resources.limits.memory }} - - name: PUBLISHER_IMAGE - value: "{{include "imageurl" (dict "reg" .Values.global.containerRegistry "img" .Values.global.images.publisher_proxy) }}" - - name: PUBLISHER_IMAGE_PULL_POLICY - value: "{{ .Values.publisherProxy.image.pullPolicy }}" - - name: PUBLISHER_REPLICAS - value: "{{ .Values.publisherProxy.replicas }}" - - name: PUBLISHER_REQUEST_TIMEOUT - value: "{{ .Values.publisherProxy.requestTimeout }}" - {{- if .Values.global.priorityClassName }} - - name: PUBLISHER_PRIORITY_CLASS_NAME - value: "{{ .Values.global.priorityClassName }}" - {{- end }} - - name: DEFAULT_MAX_IN_FLIGHT_MESSAGES - value: "{{ .Values.eventingBackend.defaultMaxInflightMessages }}" - - name: DEFAULT_DISPATCHER_RETRY_PERIOD - value: "{{ .Values.eventingBackend.defaultDispatcherRetryPeriod }}" - - name: DEFAULT_DISPATCHER_MAX_RETRIES - value: "{{ .Values.eventingBackend.defaultDispatcherMaxRetries }}" - - name: APP_LOG_FORMAT - value: {{ .Values.global.log.format | quote }} - - name: APP_LOG_LEVEL - value: {{ .Values.global.log.level | quote }} - - name: JS_STREAM_NAME - value: {{ .Values.jetstream.streamName | quote }} - - name: JS_STREAM_SUBJECT_PREFIX - value: {{ .Values.jetstream.streamSubjectPrefix | quote }} - - name: JS_STREAM_STORAGE_TYPE - value: {{ .Values.global.jetstream.storage | quote }} - - name: JS_STREAM_REPLICAS - value: {{ .Values.jetstream.streamReplicas | quote }} - - name: JS_STREAM_DISCARD_POLICY - value: {{ .Values.global.jetstream.discardPolicy | quote }} - - name: JS_STREAM_RETENTION_POLICY - value: {{ .Values.jetstream.retentionPolicy | quote }} - - name: JS_CONSUMER_DELIVER_POLICY - value: {{ .Values.jetstream.consumerDeliverPolicy | quote }} - - name: JS_STREAM_MAX_MSGS - value: {{ .Values.jetstream.maxMessages | quote }} - - name: JS_STREAM_MAX_BYTES - value: {{ .Values.global.jetstream.maxBytes | quote }} - - name: WEBHOOK_SECRET_NAME - value: {{ .Values.webhook.secretName | quote }} - - name: MUTATING_WEBHOOK_NAME - value: {{ .Values.webhook.mutating.name | quote }} - - name: VALIDATING_WEBHOOK_NAME - value: {{ .Values.webhook.validating.name | quote }} - - name: EVENTING_WEBHOOK_AUTH_ENABLED - value: {{ .Values.eventingWebhookAuth.enabled | quote }} - - name: EVENTING_WEBHOOK_AUTH_SECRET_NAME - value: {{ .Values.eventingWebhookAuth.secret.name | quote }} - - name: EVENTING_WEBHOOK_AUTH_SECRET_NAMESPACE - value: {{ .Values.eventingWebhookAuth.secret.namespace | quote }} - - name: NATS_PROVISIONING_ENABLED - value: {{ .Values.global.jetstream.enabled | quote }} - resources: - requests: - cpu: {{ .Values.resources.requests.cpu }} - memory: {{ .Values.resources.requests.memory }} - limits: - cpu: {{ .Values.resources.limits.cpu }} - memory: {{ .Values.resources.limits.memory }} - livenessProbe: - failureThreshold: {{ .Values.healthProbe.liveness.failureThreshold }} - httpGet: - path: {{ .Values.healthProbe.liveness.service.path }} - port: {{ .Values.healthProbe.port }} - scheme: {{ .Values.healthProbe.scheme }} - initialDelaySeconds: {{ .Values.healthProbe.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.healthProbe.liveness.periodSeconds }} - successThreshold: {{ .Values.healthProbe.liveness.successThreshold }} - timeoutSeconds: {{ .Values.healthProbe.liveness.timeoutSeconds }} - readinessProbe: - failureThreshold: {{ .Values.healthProbe.readiness.failureThreshold }} - httpGet: - path: {{ .Values.healthProbe.readiness.service.path }} - port: {{ .Values.healthProbe.port }} - scheme: {{ .Values.healthProbe.scheme }} - initialDelaySeconds: {{ .Values.healthProbe.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.healthProbe.readiness.periodSeconds }} - successThreshold: {{ .Values.healthProbe.readiness.successThreshold }} - timeoutSeconds: {{ .Values.healthProbe.readiness.timeoutSeconds }} - {{- if .Values.global.containerSecurityContext }} - securityContext: {{- toYaml .Values.global.containerSecurityContext | nindent 12 }} - {{- end }} - ports: - - containerPort: {{ .Values.metrics.config.port }} - name: {{ .Values.global.ports.namePrefix }}{{ .Values.metrics.config.portName }} - protocol: TCP - - containerPort: {{ .Values.webhook.targetPort }} - name: webhook-server - protocol: TCP - volumeMounts: - - mountPath: /tmp/k8s-webhook-server/serving-certs - name: cert - readOnly: true - volumes: - - name: cert - secret: - defaultMode: 420 - secretName: {{ .Values.webhook.secretName }} - {{- if .Values.global.priorityClassName }} - priorityClassName: {{ .Values.global.priorityClassName }} - {{- end }} diff --git a/resources/eventing/charts/controller/templates/eventingbackend.yaml b/resources/eventing/charts/controller/templates/eventingbackend.yaml deleted file mode 100644 index 97ec5897e7a2..000000000000 --- a/resources/eventing/charts/controller/templates/eventingbackend.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# This triggers initial reconciliation for eventing-controller and is updated with necessary labels/status -apiVersion: eventing.kyma-project.io/v1alpha1 -kind: EventingBackend -metadata: - name: {{ include "eventing.backend.name" . }} -spec: {} diff --git a/resources/eventing/charts/controller/templates/oauth2-client.yaml b/resources/eventing/charts/controller/templates/oauth2-client.yaml deleted file mode 100644 index adcb433dd044..000000000000 --- a/resources/eventing/charts/controller/templates/oauth2-client.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{ if not .Values.eventingWebhookAuth.enabled}} -# Used by controller for BEB backend -apiVersion: hydra.ory.sh/v1alpha1 -kind: OAuth2Client -metadata: - name: {{ include "controller.fullname" . }} - labels: {{- include "controller.labels" . | nindent 4 }} -spec: - grantTypes: - - client_credentials - hydraAdmin: {} - metadata: null - scope: read write beb uaa.resource - secretName: {{ include "controller.fullname" . }}{{ .Values.bebSecret.nameSuffix }} -{{ end }} diff --git a/resources/eventing/charts/controller/templates/peerauthentication.yaml b/resources/eventing/charts/controller/templates/peerauthentication.yaml deleted file mode 100644 index f703200f7d3d..000000000000 --- a/resources/eventing/charts/controller/templates/peerauthentication.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# Used by publisher proxy for NATS backend -apiVersion: security.istio.io/v1beta1 -kind: PeerAuthentication -metadata: - name: {{ include "controller.fullname" . }}{{ .Values.metrics.config.nameSuffix }} - namespace: {{ .Release.Namespace }} - labels: {{- include "controller.labels" . | nindent 4 }} -spec: - selector: - matchLabels: {{- include "controller.peerAuth.selectorLabels" . | nindent 6 }} - portLevelMtls: - {{ .Values.metrics.config.port }}: - mode: PERMISSIVE diff --git a/resources/eventing/charts/controller/templates/service.yaml b/resources/eventing/charts/controller/templates/service.yaml deleted file mode 100644 index 2d550b0d566f..000000000000 --- a/resources/eventing/charts/controller/templates/service.yaml +++ /dev/null @@ -1,44 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "controller.fullname" . }}{{ .Values.metrics.config.nameSuffix }} - labels: {{- include "controller.labels" . | nindent 4 }} - annotations: - prometheus.io/scrape: "true" - prometheus.io/scheme: http - prometheus.io/port: {{ .Values.metrics.config.port | quote }} -spec: - type: ClusterIP - selector: {{- include "controller.selectorLabels" . | nindent 4 }} - ports: - - name: {{ .Values.global.ports.namePrefix }}{{ .Values.metrics.config.portName }} - protocol: TCP - port: 80 - targetPort: {{ .Values.metrics.config.port }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "controller.fullname" . }}-health - labels: {{- include "controller.labels" . | nindent 4 }} -spec: - type: ClusterIP - selector: {{- include "controller.selectorLabels" . | nindent 4 }} - ports: - - name: {{ .Values.global.ports.namePrefix }}{{ .Values.global.istio.proxy.portName }} - protocol: TCP - port: {{ .Values.global.istio.proxy.statusPort }} - targetPort: {{ .Values.global.istio.proxy.statusPort }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "controller.fullname" . }}-webhook-service - labels: {{- include "controller.labels" . | nindent 4 }} -spec: - selector: {{- include "controller.selectorLabels" . | nindent 4 }} - ports: - - name: {{ .Values.global.ports.namePrefix }}convert - port: {{ .Values.webhook.port }} - protocol: TCP - targetPort: {{ .Values.webhook.targetPort }} diff --git a/resources/eventing/charts/controller/templates/serviceaccount.yaml b/resources/eventing/charts/controller/templates/serviceaccount.yaml deleted file mode 100644 index f523d978f2eb..000000000000 --- a/resources/eventing/charts/controller/templates/serviceaccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "controller.fullname" . }} - labels: - {{- include "controller.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} diff --git a/resources/eventing/charts/controller/templates/webhook-cert-handler.yaml b/resources/eventing/charts/controller/templates/webhook-cert-handler.yaml deleted file mode 100644 index fc7e00f5eae9..000000000000 --- a/resources/eventing/charts/controller/templates/webhook-cert-handler.yaml +++ /dev/null @@ -1,91 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "controller.fullname" . }}-cert-handler - labels: - app: {{ include "controller.fullname" . }}-cert-handler - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "controller.fullname" . }}-cert-handler -rules: - - apiGroups: ["apiextensions.k8s.io"] - resources: ["customresourcedefinitions"] - verbs: ["get", "patch", "list", "watch", "update"] - - apiGroups: [""] - resources: ["secrets"] - verbs: ["create", "get", "patch", "list", "watch", "update"] ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "controller.fullname" . }}-cert-handler -subjects: - - kind: ServiceAccount - name: {{ include "controller.fullname" . }}-cert-handler - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ include "controller.fullname" . }}-cert-handler ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ include "controller.fullname" . }}-cert-handler - labels: - app: {{ include "controller.fullname" . }}-cert-handler - annotations: - sidecar.istio.io/inject: "false" -spec: - template: - metadata: - annotations: - sidecar.istio.io/inject: "false" - spec: - restartPolicy: Never - containers: - - name: init-certificates - image: "{{include "imageurl" (dict "reg" .Values.global.containerRegistry "img" .Values.global.images.certHandler) }}" - imagePullPolicy: IfNotPresent - env: - - name: CRD_NAME - value: {{ .Values.webhook.crdName }} - - name: SECRET_NAME - value: {{ .Values.webhook.secretName }} - serviceAccountName: {{ include "controller.fullname" . }}-cert-handler ---- -apiVersion: batch/v1 -kind: CronJob -metadata: - name: {{ include "controller.fullname" . }}-cert-handler - labels: - app: {{ include "controller.fullname" . }}-cert-handler - annotations: - sidecar.istio.io/inject: "false" -spec: - # Run cronjob two times per week on Sunday and on Thursday - schedule: "0 0 * * 0,4" - jobTemplate: - spec: - template: - metadata: - annotations: - sidecar.istio.io/inject: "false" - spec: - restartPolicy: Never - containers: - - name: update-certificates - image: "{{include "imageurl" (dict "reg" .Values.global.containerRegistry "img" .Values.global.images.certHandler) }}" - imagePullPolicy: IfNotPresent - env: - - name: CRD_NAME - value: {{ .Values.webhook.crdName }} - - name: SECRET_NAME - value: {{ .Values.webhook.secretName }} - serviceAccountName: {{ include "controller.fullname" . }}-cert-handler diff --git a/resources/eventing/charts/controller/templates/webhook.yaml b/resources/eventing/charts/controller/templates/webhook.yaml deleted file mode 100644 index 607fd5607865..000000000000 --- a/resources/eventing/charts/controller/templates/webhook.yaml +++ /dev/null @@ -1,53 +0,0 @@ -apiVersion: admissionregistration.k8s.io/v1 -kind: MutatingWebhookConfiguration -metadata: - creationTimestamp: null - name: {{ .Values.webhook.mutating.name }} -webhooks: - - admissionReviewVersions: - - v1 - clientConfig: - service: - name: {{ include "controller.fullname" . }}-webhook-service - namespace: {{ .Release.Namespace }} - path: /mutate-eventing-kyma-project-io-v1alpha2-subscription - failurePolicy: Fail - name: msubscription.kb.io - rules: - - apiGroups: - - eventing.kyma-project.io - apiVersions: - - v1alpha2 - operations: - - CREATE - - UPDATE - resources: - - subscriptions - sideEffects: None ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - creationTimestamp: null - name: {{ .Values.webhook.validating.name }} -webhooks: - - admissionReviewVersions: - - v1 - clientConfig: - service: - name: {{ include "controller.fullname" . }}-webhook-service - namespace: {{ .Release.Namespace }} - path: /validate-eventing-kyma-project-io-v1alpha2-subscription - failurePolicy: Fail - name: vsubscription.kb.io - rules: - - apiGroups: - - eventing.kyma-project.io - apiVersions: - - v1alpha2 - operations: - - CREATE - - UPDATE - resources: - - subscriptions - sideEffects: None diff --git a/resources/eventing/charts/controller/values.yaml b/resources/eventing/charts/controller/values.yaml deleted file mode 100644 index fb526fec6889..000000000000 --- a/resources/eventing/charts/controller/values.yaml +++ /dev/null @@ -1,110 +0,0 @@ -# override name to avoid collision with knative eventing resources -nameOverride: -replicaCount: 1 -serviceAccount: - # name defines optionally another name than the default name for the service account - name: "" - annotations: "" - - -clusterRole: - # name defines optionally another name than the default name for the cluster role - name: "" - -bebSecret: - nameSuffix: "-beb-oauth2" - -resources: - limits: - cpu: 300m - memory: 100Mi - requests: - cpu: 10m - memory: 20Mi - -publisherProxy: - image: - pullPolicy: IfNotPresent - requestTimeout: 10s - replicas: 1 - resources: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 10m - memory: 64Mi - -metrics: - config: - port: 8080 - portName: metrics - nameSuffix: "-metrics" - -webhook: - port: 443 - targetPort: 9443 - crdName: subscriptions.eventing.kyma-project.io - secretName: eventing-webhook-server-cert - mutating: - name: subscription-mutating-webhook-configuration - validating: - name: subscription-validating-webhook-configuration - -clusterRoleBindingSuffix: "" - -eventingBackend: - name: eventing-backend - defaultMaxInflightMessages: 10 - defaultDispatcherRetryPeriod: 5m - defaultDispatcherMaxRetries: 10 - -healthProbe: - port: 8081 - scheme: HTTP - liveness: - service: - path: "/healthz" - failureThreshold: 3 - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 2 - readiness: - service: - path: "/readyz" - failureThreshold: 3 - initialDelaySeconds: 10 - periodSeconds: 3 - successThreshold: 1 - timeoutSeconds: 2 - -jetstream: - # Configs for the stream used for storing events - # Name of the JetStream stream where all events are stored. - streamName: sap - # Prefix for the subjects in the stream - streamSubjectPrefix: kyma - # Number of replicas for JetStream stream (max: 5) - streamReplicas: 1 - # Retention policy determines when messages are deleted from the stream: - # (more info https://docs.nats.io/using-nats/developer/develop_jetstream/model_deep_dive#stream-limits-retention-and-policy): - # - interest: When all known observables have acknowledged a message, it can be removed. - # - limits: Retain messages until any given limit is reached. Configure limits with maxMessages and maxBytes. - retentionPolicy: interest - # Consumer Deliver Policy determines from where in the stream a consumer starts receiving messages - # (more info https://docs.nats.io/nats-concepts/jetstream/consumers#deliverpolicy-optstartseq-optstarttime): - # - all: The consumer starts receiving from the earliest available message. - # - last: When first consuming messages, the consumer starts receiving messages with the latest message. - # - last_per_subject: When first consuming messages, start with the latest one for each filtered subject - # currently in the stream. - # - new: When first consuming messages, the consumer starts receiving messages that were created - consumerDeliverPolicy: new - maxMessages: -1 # no limit - maxBytes: -1 - -eventingWebhookAuth: - enabled: true - secret: - name: eventing-webhook-auth - namespace: kyma-system diff --git a/resources/eventing/charts/nats/.helmignore b/resources/eventing/charts/nats/.helmignore deleted file mode 100644 index 50af03172541..000000000000 --- a/resources/eventing/charts/nats/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/resources/eventing/charts/nats/Chart.yaml b/resources/eventing/charts/nats/Chart.yaml deleted file mode 100644 index e7ba09a630a9..000000000000 --- a/resources/eventing/charts/nats/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v2 -name: nats -description: Helm chart for nats -version: 0.17.3 diff --git a/resources/eventing/charts/nats/README.md b/resources/eventing/charts/nats/README.md deleted file mode 100644 index 023a1bc0a30d..000000000000 --- a/resources/eventing/charts/nats/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# NATS Server - - -## Overview - -This Helm chart deploys [NATS](https://nats.io/) using NATS [Helm chart](https://github.com/nats-io/k8s/tree/v0.9.0/helm/charts/nats). - - - -## Installation - -To install this chart, follow these steps: - -1. Install NATS into the `nats` namespace using Helm 3 : -```bash -kubectl create namespace nats -helm template nats nats -n nats | kubectl apply -f - -``` -2. Test the installation: -```bash -$ kubectl -n nats port-forward nats-1 4222 -``` - -## Configuration - -### Limits - -```yaml -nats: - # The number of connect attempts against discovered routes. - connectRetries: 30 - - # Server settings. - limits: - maxConnections: - maxSubscriptions: - maxControlLine: - maxPayload: - - writeDeadline: - maxPending: - maxPings: - lameDuckDuration: - - # Number of seconds to wait for client connections to end after the pod termination is requested - terminationGracePeriodSeconds: 60 -``` - -### Logging - -*Note*: It is not recommended to enable trace or debug in production since enabling it will significantly degrade performance. - -```yaml -nats: - logging: - debug: - trace: - logtime: - connectErrorReports: - reconnectErrorReports: -``` - -## Clustering - -If clustering is enabled, then a 3-node cluster will be setup. More info at: -https://docs.nats.io/nats-server/configuration/clustering#nats-server-clustering - -```yaml -cluster: - enabled: true - replicas: 3 -``` - -## JetStream - -### Setting up Memory and File Storage - -File Storage is **always** recommended, since JetStream's RAFT Meta Group will be persisted to file storage. The Storage Class used should be block storage. NFS is not recommended. - -```yaml -nats: - image: nats:alpine - - jetstream: - enabled: true - - memStorage: - enabled: true - size: 2Gi - - fileStorage: - enabled: true - size: 1Gi - storageDirectory: /data/ - storageClassName: default -``` diff --git a/resources/eventing/charts/nats/templates/_helpers.tpl b/resources/eventing/charts/nats/templates/_helpers.tpl deleted file mode 100644 index db762554bc66..000000000000 --- a/resources/eventing/charts/nats/templates/_helpers.tpl +++ /dev/null @@ -1,87 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "nats.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - - -{{- define "nats.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "nats.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "nats.labels" -}} -helm.sh/chart: {{ include "nats.chart" . }} -{{- range $name, $value := .Values.commonLabels }} -{{ $name }}: {{ $value }} -{{- end }} -{{ include "nats.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "nats.selectorLabels" -}} -{{- if .Values.nats.selectorLabels -}} -{{ .Values.nats.selectorLabels | toYaml }} -{{- else -}} -app.kubernetes.io/name: {{ include "nats.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -kyma-project.io/dashboard: eventing -{{- end -}} -{{- end }} - - -{{/* -Return the proper NATS image name -*/}} -{{- define "nats.clusterAdvertise" -}} -{{- printf "$(POD_NAME).%s.$(POD_NAMESPACE).svc.%s" (include "nats.fullname" . ) $.Values.k8sClusterDomain }} -{{- end }} - -{{/* -Return the NATS cluster routes. -*/}} -{{- define "nats.clusterRoutes" -}} -{{- $name := (include "nats.fullname" . ) -}} -{{- range $i, $e := until (.Values.cluster.replicas | int) -}} -{{- printf "nats://%s-%d.%s.%s.svc.%s:6222," $name $i $name $.Release.Namespace $.Values.k8sClusterDomain -}} -{{- end -}} -{{- end }} - - -{{/* -Renders a value that contains template. -Usage: -{{ include "tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }} -*/}} -{{- define "tplvalues.render" -}} - {{- if typeIs "string" .value }} - {{- tpl .value .context }} - {{- else }} - {{- tpl (.value | toYaml) .context }} - {{- end }} -{{- end -}} diff --git a/resources/eventing/charts/nats/templates/configmap.yaml b/resources/eventing/charts/nats/templates/configmap.yaml deleted file mode 100644 index 397d34c775fc..000000000000 --- a/resources/eventing/charts/nats/templates/configmap.yaml +++ /dev/null @@ -1,164 +0,0 @@ -{{- if .Values.global.jetstream.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "nats.fullname" . }}-config - namespace: {{ .Release.Namespace | quote }} - labels: - {{- include "nats.labels" . | nindent 4 }} -data: - nats.conf: | - # NATS Clients Port - port: {{ .Values.nats.ports.client }} - - # PID file shared with configuration reloader. - pid_file: "/var/run/nats/nats.pid" - - ############### - # # - # Monitoring # - # # - ############### - http: 8222 - server_name: $POD_NAME - - ################################### - # # - # NATS JetStream # - # # - ################################### - jetstream { - {{- if .Values.nats.jetstream.encryption }} - {{- if .Values.nats.jetstream.encryption.key }} - key: {{ .Values.nats.jetstream.encryption.key | quote }} - {{- else if .Values.nats.jetstream.encryption.secret }} - key: $JS_KEY - {{- end}} - {{- end}} - - {{- if .Values.nats.jetstream.memStorage.enabled }} - max_mem: {{ .Values.nats.jetstream.memStorage.size }} - {{- end }} - - {{- if .Values.nats.jetstream.domain }} - domain: {{ .Values.nats.jetstream.domain }} - {{- end }} - - {{- if eq .Values.global.jetstream.storage "file" }} - store_dir: {{ .Values.nats.jetstream.fileStorage.storageDirectory }} - - max_file: - {{- if .Values.nats.jetstream.fileStorage.existingClaim }} - {{- .Values.nats.jetstream.fileStorage.claimStorageSize }} - {{- else }} - {{- .Values.nats.jetstream.fileStorage.size }} - {{- end }} - {{- end }} - - {{- if .Values.nats.jetstream.uniqueTag }} - unique_tag: {{ .Values.nats.jetstream.uniqueTag }} - {{- end }} - } - - {{- if .Values.cluster.enabled }} - ################################### - # # - # NATS Full Mesh Clustering Setup # - # # - ################################### - cluster { - port: 6222 - - {{- if .Values.cluster.name }} - name: {{ .Values.cluster.name }} - {{- else }} - name: {{ template "nats.name" . }} - {{- end }} - - routes = [ - {{ include "nats.clusterRoutes" . }} - ] - cluster_advertise: $CLUSTER_ADVERTISE - - {{- with .Values.cluster.noAdvertise }} - no_advertise: {{ . }} - {{- end }} - - connect_retries: {{ .Values.nats.connectRetries }} - } - {{- end }} - - {{- with .Values.nats.logging.debug }} - debug: {{ . }} - {{- end }} - - {{- with .Values.nats.logging.trace }} - trace: {{ . }} - {{- end }} - - {{- with .Values.nats.logging.logtime }} - logtime: {{ . }} - {{- end }} - - {{- with .Values.nats.logging.connectErrorReports }} - connect_error_reports: {{ . }} - {{- end }} - - {{- with .Values.nats.logging.reconnectErrorReports }} - reconnect_error_reports: {{ . }} - {{- end }} - - {{- with .Values.nats.limits.maxConnections }} - max_connections: {{ . }} - {{- end }} - - {{- with .Values.nats.limits.maxSubscriptions }} - max_subscriptions: {{ . }} - {{- end }} - - {{- with .Values.nats.limits.maxPending }} - max_pending: {{ . }} - {{- end }} - - {{- with .Values.nats.limits.maxControlLine }} - max_control_line: {{ . }} - {{- end }} - - {{- with .Values.nats.limits.maxPayload }} - max_payload: {{ . }} - {{- end }} - - {{- with .Values.nats.limits.pingInterval }} - ping_interval: {{ . }} - {{- end }} - - {{- with .Values.nats.limits.maxPings }} - ping_max: {{ . }} - {{- end }} - - {{- with .Values.nats.limits.writeDeadline }} - write_deadline: {{ . }} - {{- end }} - - {{- with .Values.nats.limits.lameDuckGracePeriod }} - lame_duck_grace_period: {{ . }} - {{- end }} - - {{- with .Values.nats.limits.lameDuckDuration }} - lame_duck_duration: {{ . }} - {{- end }} - - {{- if .Values.auth.enabled }} - ################## - # # - # Authorization # - # # - ################## - {{- if .Values.auth.resolver }} - {{- if eq .Values.auth.resolver.type "memory" }} - resolver: MEMORY - include "accounts/resolver.conf" - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/resources/eventing/charts/nats/templates/destination-rule.yaml b/resources/eventing/charts/nats/templates/destination-rule.yaml deleted file mode 100644 index 62386c983b29..000000000000 --- a/resources/eventing/charts/nats/templates/destination-rule.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if .Values.global.jetstream.enabled }} -apiVersion: networking.istio.io/v1alpha3 -kind: DestinationRule -metadata: - name: {{ include "nats.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: - {{- include "nats.labels" . | nindent 4 }} -spec: - host: {{ include "nats.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - trafficPolicy: - tls: - mode: DISABLE -{{- end }} diff --git a/resources/eventing/charts/nats/templates/service.yaml b/resources/eventing/charts/nats/templates/service.yaml deleted file mode 100644 index bb4b96a6cf85..000000000000 --- a/resources/eventing/charts/nats/templates/service.yaml +++ /dev/null @@ -1,56 +0,0 @@ -{{- if .Values.global.jetstream.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "nats.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: - {{- include "nats.labels" . | nindent 4 }} - {{- if .Values.serviceAnnotations}} - annotations: - {{- toYaml .Values.serviceAnnotations | nindent 4 }} - {{- end }} -spec: - selector: - {{- include "nats.selectorLabels" . | nindent 4 }} - clusterIP: None - publishNotReadyAddresses: true - ports: - {{- if .Values.nats.profiling.enabled }} - - name: profiling - port: {{ .Values.nats.profiling.port }} - {{- if .Values.appProtocol.enabled }} - appProtocol: http - {{- end }} - {{- end }} - - name: client - port: {{ .Values.nats.ports.client }} - {{- if .Values.appProtocol.enabled }} - appProtocol: tcp - {{- end }} - - name: cluster - port: {{ .Values.nats.ports.cluster }} - {{- if .Values.appProtocol.enabled }} - appProtocol: tcp - {{- end }} - - name: monitor - port: {{ .Values.nats.ports.monitoring }} - {{- if .Values.appProtocol.enabled }} - appProtocol: http - {{- end }} - - name: metrics - port: {{ .Values.nats.ports.metrics }} - {{- if .Values.appProtocol.enabled }} - appProtocol: http - {{- end }} - - name: leafnodes - port: {{ .Values.nats.ports.leafnodes }} - {{- if .Values.appProtocol.enabled }} - appProtocol: tcp - {{- end }} - - name: gateways - port: {{ .Values.nats.ports.gateways }} - {{- if .Values.appProtocol.enabled }} - appProtocol: tcp - {{- end }} -{{- end }} diff --git a/resources/eventing/charts/nats/templates/statefulset.yaml b/resources/eventing/charts/nats/templates/statefulset.yaml deleted file mode 100644 index 18b37cd6a8ca..000000000000 --- a/resources/eventing/charts/nats/templates/statefulset.yaml +++ /dev/null @@ -1,309 +0,0 @@ -{{- if .Values.global.jetstream.enabled }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "nats.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: - {{- include "nats.labels" . | nindent 4 }} - {{- if .Values.statefulSetAnnotations }} - annotations: - {{- toYaml .Values.statefulSetAnnotations | nindent 4 }} - {{- end }} -spec: - selector: - matchLabels: - {{- include "nats.selectorLabels" . | nindent 6 }} - {{- if .Values.cluster.enabled }} - replicas: {{ .Values.cluster.replicas }} - {{- else }} - replicas: 1 - {{- end }} - serviceName: {{ include "nats.fullname" . }} - - podManagementPolicy: {{ .Values.global.jetstream.podManagementPolicy }} - - template: - metadata: - {{- if or .Values.exporter.enabled .Values.nats.configChecksumAnnotation .Values.podAnnotations }} - annotations: - {{- if .Values.exporter.enabled }} - prometheus.io/scrape: "false" - {{- end }} - {{- if .Values.nats.configChecksumAnnotation }} - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - {{- end }} - {{- if .Values.podAnnotations }} - {{- toYaml .Values.podAnnotations | nindent 8 }} - {{- end }} - {{- end }} - labels: - {{- include "nats.selectorLabels" . | nindent 8 }} - {{- if .Values.statefulSetPodLabels }} - {{ toYaml .Values.statefulSetPodLabels | nindent 8 }} - {{- end }} - spec: -{{- if or .Values.priorityClassName .Values.global.priorityClassName }} - priorityClassName: {{ coalesce .Values.priorityClassName .Values.global.priorityClassName }} -{{- end }} -{{- if .Values.podSecurityContext }} - securityContext: {{ toYaml .Values.podSecurityContext | nindent 8 }} -{{- end }} -{{- with .Values.affinity }} - affinity: -{{- tpl (toYaml .) $ | nindent 8 }} -{{- end }} - # Common volumes for the containers. - volumes: - ### the secret that holds account data ### - {{- if and .Values.auth.enabled .Values.auth.resolver }} - - name: accounts-volume - secret: - secretName: {{ include "nats.fullname" . }}-secret - {{- end }} - - name: config-volume - configMap: - name: {{ include "nats.fullname" . }}-config - - # Local volume shared with the reloader. - - name: pid - emptyDir: {} - - {{- if and (eq .Values.global.jetstream.storage "file") .Values.nats.jetstream.fileStorage.existingClaim }} - # Persistent volume for jetstream running with file storage option - - name: {{ include "nats.fullname" . }}-js-pvc - persistentVolumeClaim: - claimName: {{ .Values.nats.jetstream.fileStorage.existingClaim | quote }} - {{- end }} - - # Required to be able to HUP signal and apply config - # reload to the server without restarting the pod. - shareProcessNamespace: true - - ################# - # # - # NATS Server # - # # - ################# - terminationGracePeriodSeconds: {{ .Values.nats.terminationGracePeriodSeconds }} - containers: - ################################# - # # - # NATS Configuration Reloader # - # # - ################################# - - name: config-reloader - image: "{{ include "imageurl" (dict "reg" .Values.global.containerRegistry "img" .Values.global.images.nats_config_reloader) }}" - imagePullPolicy: {{ .Values.nats.pullPolicy }} - {{- if .Values.containerSecurityContext }} - securityContext: {{- toYaml .Values.containerSecurityContext | nindent 10 }} - {{- end }} - command: - - "nats-server-config-reloader" - - "-pid" - - "/var/run/nats/nats.pid" - - "-config" - - "/etc/nats-config/nats.conf" - - "-config" - - "/etc/nats-config/accounts/resolver.conf" - volumeMounts: - - name: config-volume - mountPath: /etc/nats-config - - name: pid - mountPath: /var/run/nats - - name: accounts-volume - mountPath: /etc/nats-config/accounts - - ############################## - # # - # NATS Prometheus Exporter # - # # - ############################## - {{- if .Values.exporter.enabled }} - - name: metrics - image: "{{ include "imageurl" (dict "reg" .Values.global.containerRegistry "img" .Values.global.images.prometheus_nats_exporter) }}" - imagePullPolicy: {{ .Values.exporter.pullPolicy }} - {{- if .Values.containerSecurityContext }} - securityContext: {{- toYaml .Values.containerSecurityContext | nindent 10 }} - {{- end }} - resources: - {{- toYaml .Values.exporter.resources | nindent 10 }} - args: - - -connz - - -routez - - -subz - - -varz - - -healthz - - -prefix=nats - - -use_internal_server_id - - -jsz=all - - http://localhost:8222/ - ports: - - containerPort: 7777 - name: metrics - {{- end }} - - name: nats - image: "{{ include "imageurl" (dict "reg" .Values.global.containerRegistry "img" .Values.global.images.nats) }}" - imagePullPolicy: {{ .Values.nats.pullPolicy }} - {{- if .Values.containerSecurityContext }} - securityContext: {{- toYaml .Values.containerSecurityContext | nindent 10 }} - {{- end }} - resources: - {{- toYaml .Values.nats.resources | nindent 10 }} - ports: - - containerPort: {{ .Values.nats.ports.client }} - name: client - - containerPort: {{ .Values.nats.ports.leafnodes }} - name: leafnodes - - containerPort: {{ .Values.nats.ports.gateways }} - name: gateways - - containerPort: {{ .Values.nats.ports.cluster }} - name: cluster - - containerPort: {{ .Values.nats.ports.monitoring }} - name: monitor - - containerPort: {{ .Values.nats.ports.metrics }} - name: metrics - {{- if .Values.nats.profiling.enabled }} - - containerPort: {{ .Values.nats.profiling.port }} - name: profiling - {{- end }} - - command: - - "nats-server" - - "--config" - - "/etc/nats-config/nats.conf" - {{- if .Values.nats.profiling.enabled }} - - "--profile={{ .Values.nats.profiling.port }}" - {{- end }} - - # Required to be able to define an environment variable - # that refers to other environment variables. This env var - # is later used as part of the configuration file. - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: CLUSTER_ADVERTISE - value: {{ include "nats.clusterAdvertise" . }} - - {{- with .Values.nats.jetstream.encryption }} - {{- with .secret }} - - name: JS_KEY - valueFrom: - secretKeyRef: - name: {{ .name }} - key: {{ .key }} - {{- end }} - {{- end }} - volumeMounts: - ### the secret that holds account data ### - {{- if and .Values.auth.enabled .Values.auth.resolver }} - {{- if eq .Values.auth.resolver.type "memory" }} - - name: accounts-volume - mountPath: /etc/nats-config/accounts - {{- end }} - {{- end }} - - name: config-volume - mountPath: /etc/nats-config - - name: pid - mountPath: /var/run/nats - {{- if (eq .Values.global.jetstream.storage "file") }} - - name: {{ include "nats.fullname" . }}-js-pvc - mountPath: {{ .Values.nats.jetstream.fileStorage.storageDirectory }} - {{- end }} - - ####################### - # # - # Healthcheck Probes # - # # - ####################### - {{- if .Values.nats.healthcheck }} - - {{- with .Values.nats.healthcheck.liveness }} - {{- if .enabled }} - livenessProbe: - httpGet: - path: {{ .endpoint }} - port: 8222 - initialDelaySeconds: {{ .initialDelaySeconds }} - timeoutSeconds: {{ .timeoutSeconds }} - periodSeconds: {{ .periodSeconds }} - successThreshold: {{ .successThreshold }} - failureThreshold: {{ .failureThreshold }} - {{- if .terminationGracePeriodSeconds }} - terminationGracePeriodSeconds: {{ .terminationGracePeriodSeconds }} - {{- end }} - {{- end }} - {{- end }} - - {{- with .Values.nats.healthcheck.readiness }} - {{- if .enabled }} - readinessProbe: - httpGet: - path: {{ .endpoint }} - port: 8222 - initialDelaySeconds: {{ .initialDelaySeconds }} - timeoutSeconds: {{ .timeoutSeconds }} - periodSeconds: {{ .periodSeconds }} - successThreshold: {{ .successThreshold }} - failureThreshold: {{ .failureThreshold }} - {{- end }} - {{- end }} - - {{- with .Values.nats.healthcheck.startup }} - {{- if .enabled }} - startupProbe: - httpGet: - path: {{ .endpoint }} - port: 8222 - initialDelaySeconds: {{ .initialDelaySeconds }} - timeoutSeconds: {{ .timeoutSeconds }} - periodSeconds: {{ .periodSeconds }} - successThreshold: {{ .successThreshold }} - failureThreshold: {{ .failureThreshold }} - {{- end }} - {{- end }} - - {{- end }} - - # Gracefully stop NATS Server on pod deletion or image upgrade. - # - lifecycle: - preStop: - exec: - # send the lame duck shutdown signal to trigger a graceful shutdown - # nats-server will ignore the TERM signal it receives after this - # - command: - - "nats-server" - - "-sl=ldm=/var/run/nats/nats.pid" - - volumeClaimTemplates: - {{- if and (eq .Values.global.jetstream.storage "file") (not .Values.nats.jetstream.fileStorage.existingClaim) }} - ##################################### - # # - # Jetstream New Persistent Volume # - # # - ##################################### - - metadata: - name: {{ include "nats.fullname" . }}-js-pvc - {{- if .Values.nats.jetstream.fileStorage.annotations }} - annotations: - {{- toYaml .Values.nats.jetstream.fileStorage.annotations | nindent 10 }} - {{- end }} - spec: - accessModes: - {{- toYaml .Values.nats.jetstream.fileStorage.accessModes | nindent 10 }} - resources: - requests: - storage: {{ .Values.global.jetstream.fileStorage.size }} - {{- if .Values.nats.jetstream.fileStorage.storageClassName }} - storageClassName: {{ .Values.nats.jetstream.fileStorage.storageClassName | quote }} - {{- end }} - {{- end }} -{{- end }} diff --git a/resources/eventing/charts/nats/values.yaml b/resources/eventing/charts/nats/values.yaml deleted file mode 100644 index 276222d1467b..000000000000 --- a/resources/eventing/charts/nats/values.yaml +++ /dev/null @@ -1,288 +0,0 @@ -#################################### -# # -# Security Context Configuration # -# # -#################################### -podSecurityContext: - fsGroup: 10001 - seccompProfile: - type: RuntimeDefault - -containerSecurityContext: - privileged: false - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - -############################### -# # -# NATS Server Configuration # -# # -############################### -nats: - pullPolicy: IfNotPresent - ports: - client: 4222 - monitoring: 8222 - cluster: 6222 - metrics: 7777 - leafnodes: 7422 - gateways: 7522 - - # Toggle profiling. - # This enables nats-server pprof (profiling) port, so you can see goroutines - # stacks, memory heap sizes, etc. - profiling: - enabled: false - port: 6000 - - # Toggle using health check probes to better detect failures. - healthcheck: - # Enable /healthz startupProbe for controlled upgrades of NATS JetStream - enableHealthz: true - - # Enable liveness checks. If this fails, then the NATS Server will restarted. - liveness: - enabled: true - # `/healthz?js-enabled-only=true` will only check if NATS server is ready for accepting requests - # and JetStream is enabled or not. - # It will not check further the streams and consumers. - # The endpoint to "/healthz?js-enabled-only=true" is supported in NATS >= v2.9.11 - endpoint: "/healthz?js-enabled-only=true" - initialDelaySeconds: 10 - timeoutSeconds: 5 - # NOTE: liveness check + terminationGracePeriodSeconds can introduce unecessarily long outages - # due to the coupling between liveness probe and terminationGracePeriodSeconds. - # To avoid this, we make the periodSeconds of the liveness check to be about half the default - # time that it takes for lame duck graceful stop. - # - # In case of using Kubernetes +1.22 with probe-level terminationGracePeriodSeconds - # we could revise this but for now keep a minimal liveness check. - # - # More info: - # - # https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#probe-level-terminationgraceperiodseconds - # https://github.com/kubernetes/kubernetes/issues/64715 - # - periodSeconds: 30 - successThreshold: 1 - failureThreshold: 5 - # Only for Kubernetes +1.22 that have pod level probes enabled. - terminationGracePeriodSeconds: - - # Periodically check for the server to be ready for connections while - # the NATS container is running. - # Disabled by default since covered by startup probe and it is the same - # as the liveness check. - readiness: - enabled: true - # `/healthz?js-server-only=true` will only check if JetStream server is current or not. - # It will not check further the streams and consumers. - endpoint: "/healthz?js-server-only=true" - initialDelaySeconds: 10 - timeoutSeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - - # Enable startup checks to confirm server is ready for traffic. - # This is recommended for JetStream deployments since in cluster mode - # it will try to ensure that the server is ready to serve streams. - startup: - enabled: true - # `/healthz` will check if JetStream server, streams and consumers are current or not. - endpoint: "/healthz" - initialDelaySeconds: 10 - timeoutSeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 30 - - # Adds a hash of the ConfigMap as a pod annotation - # This will cause the StatefulSet to roll when the ConfigMap is updated - configChecksumAnnotation: false - - # Toggle to disable client advertisements (connect_urls), - # in case of running behind a load balancer - # it might be required to disable advertisements. - advertise: true - - # The number of connect attempts against discovered routes. - connectRetries: 120 - - # selector matchLabels for the server and service. - # If left empty defaults are used. - # This is helpful if you are updating from Chart version <=7.4 - selectorLabels: {} - - resources: - limits: - cpu: 20m - memory: 64Mi - requests: - cpu: 5m - memory: 16Mi - - # Server settings. - limits: - maxConnections: - maxSubscriptions: - maxControlLine: - maxPayload: - - writeDeadline: - maxPending: - maxPings: - - # How many seconds should pass before sending a PING - # to a client that has no activity. - pingInterval: - - # grace period after pod begins shutdown before starting to close client connections - lameDuckGracePeriod: "10s" - - # duration over which to slowly close client connections after lameDuckGracePeriod has passed - lameDuckDuration: "120s" - - # terminationGracePeriodSeconds determines how long to wait for graceful shutdown - # this should be at least `lameDuckGracePeriod` + `lameDuckDuration` + 20s shutdown overhead - terminationGracePeriodSeconds: 150 - - logging: - debug: true - trace: true - logtime: - connectErrorReports: - reconnectErrorReports: - - jetstream: - # Jetstream Domain - domain: - - # Jetstream Unique Tag prevent placing a stream in the same availability zone twice. - uniqueTag: - - ########################## - # # - # Jetstream Encryption # - # # - ########################## - encryption: - # Use key if you want to provide the key via Helm Values - # key: random_key - - # Use a secret reference if you want to get a key from a secret - # secret: - # name: "nats-jetstream-encryption" - # key: "key" - - ############################# - # # - # Jetstream Memory Storage # - # # - ############################# - memStorage: - enabled: true - size: 1Gi - - ############################ - # # - # Jetstream File Storage # - # # - ############################ - fileStorage: - #enabled: JetStream fileStorage can be enabled if .Values.global.jetstream.storage equals "file" - storageDirectory: /data - - # Set for use with existing PVC - # existingClaim: jetstream-pvc - # claimStorageSize: 1Gi - - # Use below block to create new persistent volume - # only used if existingClaim is not specified - size: 1Gi - # storageClassName: "" - accessModes: - - ReadWriteOnce - annotations: - # key: "value" - -# Authentication setup -auth: - enabled: true - resolver: - ############################## - # # - # Memory resolver settings # - # # - ############################## - type: memory - - -nameOverride: "" - -# Affinity for pod assignment -# ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity -affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchLabels: - nats_cluster: eventing-nats - topologyKey: topology.kubernetes.io/zone - weight: 70 - - podAffinityTerm: - labelSelector: - matchLabels: - nats_cluster: eventing-nats - topologyKey: kubernetes.io/hostname - weight: 35 -# Annotations to add to the NATS pods -# ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ -podAnnotations: { - sidecar.istio.io/inject: "false" -} - -# Annotations to add to the NATS StatefulSet -statefulSetAnnotations: {} - -# Labels to add to the pods of the NATS StatefulSet -statefulSetPodLabels: - nats_cluster: eventing-nats - -# Annotations to add to the NATS Service -serviceAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "7777" - -cluster: - enabled: false - name: eventing-nats - replicas: 3 - noAdvertise: false - -appProtocol: - enabled: true - -# Cluster Domain configured on the kubelets -# https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ -k8sClusterDomain: cluster.local - -# Add labels to all the deployed resources -commonLabels: {} - -# Prometheus NATS Exporter configuration. -exporter: - enabled: true - pullPolicy: IfNotPresent - resources: {} - # Prometheus operator ServiceMonitor support. Exporter has to be enabled - serviceMonitor: - enabled: true - labels: {} - annotations: {} - path: /metrics - # interval: - # scrapeTimeout: diff --git a/resources/eventing/charts/publisher-proxy/.helmignore b/resources/eventing/charts/publisher-proxy/.helmignore deleted file mode 100644 index 0e8a0eb36f4c..000000000000 --- a/resources/eventing/charts/publisher-proxy/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/resources/eventing/charts/publisher-proxy/Chart.yaml b/resources/eventing/charts/publisher-proxy/Chart.yaml deleted file mode 100644 index 1713ebd3f454..000000000000 --- a/resources/eventing/charts/publisher-proxy/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -name: publisher-proxy -description: Helm chart for eventing-publisher-proxy which contains resources used by eventing-publisher-proxy deployments -type: application -version: 0.1.0 -appVersion: 0.1.0 diff --git a/resources/eventing/charts/publisher-proxy/templates/_helpers.tpl b/resources/eventing/charts/publisher-proxy/templates/_helpers.tpl deleted file mode 100644 index c55ea3d17557..000000000000 --- a/resources/eventing/charts/publisher-proxy/templates/_helpers.tpl +++ /dev/null @@ -1,80 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "publisher-proxy.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "publisher-proxy.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "publisher-proxy.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "publisher-proxy.labels" -}} -helm.sh/chart: {{ include "publisher-proxy.chart" . }} -{{ include "publisher-proxy.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "publisher-proxy.selectorLabels" -}} -app.kubernetes.io/name: {{ include "publisher-proxy.fullname" . }} -kyma-project.io/dashboard: eventing -{{- end }} - -{{/* -Selector labels for peerauthentication -*/}} -{{- define "publisher-proxy.peerauth.selectorLabels" -}} -app.kubernetes.io/name: {{ include "publisher-proxy.fullname" . }} -{{- end }} - -{{/* -Service eventing-event-publisher-proxy is used by application validator pods to send traffic to -*/}} -{{- define "legacy-eventing-publisher-proxy" -}} -{{- printf "%s" "eventing-event-publisher-proxy" }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "publisher-proxy.serviceAccountName" -}} -{{- default (include "publisher-proxy.fullname" .) .Values.serviceAccount.name }} -{{- end }} - -{{/* -Publisher service Name -*/}} -{{- define "publisher-nats.serviceName" -}} -{{- printf "%s-publisher-proxy" .Release.Name | trunc 63 | trimSuffix "-" }} -{{- end }} diff --git a/resources/eventing/charts/publisher-proxy/templates/clusterrole.yaml b/resources/eventing/charts/publisher-proxy/templates/clusterrole.yaml deleted file mode 100644 index 66e988d0688f..000000000000 --- a/resources/eventing/charts/publisher-proxy/templates/clusterrole.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "publisher-proxy.fullname" . }} - labels: {{- include "publisher-proxy.labels" . | nindent 4 }} -rules: -- apiGroups: - - eventing.kyma-project.io - resources: - - subscriptions - verbs: - - get - - list - - watch -- apiGroups: - - applicationconnector.kyma-project.io - resources: - - applications - verbs: - - get - - list - - watch diff --git a/resources/eventing/charts/publisher-proxy/templates/clusterrolebinding.yaml b/resources/eventing/charts/publisher-proxy/templates/clusterrolebinding.yaml deleted file mode 100644 index b648ca15d8e7..000000000000 --- a/resources/eventing/charts/publisher-proxy/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ include "publisher-proxy.fullname" . }} - labels: {{- include "publisher-proxy.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ include "publisher-proxy.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ include "publisher-proxy.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} diff --git a/resources/eventing/charts/publisher-proxy/templates/peerauthentication.yaml b/resources/eventing/charts/publisher-proxy/templates/peerauthentication.yaml deleted file mode 100644 index f117cde0b36f..000000000000 --- a/resources/eventing/charts/publisher-proxy/templates/peerauthentication.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: security.istio.io/v1beta1 -kind: PeerAuthentication -metadata: - name: {{ include "publisher-proxy.fullname" . }}{{ .Values.metrics.config.nameSuffix }} - namespace: {{ .Release.Namespace }} - labels: {{- include "publisher-proxy.labels" . | nindent 4 }} -spec: - selector: - matchLabels: {{- include "publisher-proxy.peerauth.selectorLabels" . | nindent 6 }} - portLevelMtls: - {{ .Values.metrics.config.port }}: - mode: PERMISSIVE \ No newline at end of file diff --git a/resources/eventing/charts/publisher-proxy/templates/service.yaml b/resources/eventing/charts/publisher-proxy/templates/service.yaml deleted file mode 100644 index d22226334386..000000000000 --- a/resources/eventing/charts/publisher-proxy/templates/service.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# Used by application validator pod to send events to -# TODO https://github.com/kyma-project/kyma/issues/11319 -apiVersion: v1 -kind: Service -metadata: - name: {{ include "legacy-eventing-publisher-proxy" . }} - labels: {{- include "publisher-proxy.labels" . | nindent 4 }} -spec: - type: ClusterIP - selector: {{- include "publisher-proxy.selectorLabels" . | nindent 4 }} - ports: - - protocol: TCP - port: 80 - targetPort: {{ .Values.publisherProxy.config.port }} - name: {{ .Values.global.ports.namePrefix }}{{ .Values.publisherProxy.config.portName }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "publisher-proxy.fullname" . }} - labels: {{- include "publisher-proxy.labels" . | nindent 4 }} -spec: - type: ClusterIP - selector: {{- include "publisher-proxy.selectorLabels" . | nindent 4 }} - ports: - - protocol: TCP - port: 80 - targetPort: {{ .Values.publisherProxy.config.port }} - name: {{ .Values.global.ports.namePrefix }}{{ .Values.publisherProxy.config.portName }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "publisher-proxy.fullname" . }}{{ .Values.metrics.config.nameSuffix }} - labels: {{- include "publisher-proxy.labels" . | nindent 4 }} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: {{ .Values.metrics.config.port | quote }} - prometheus.io/scheme: "http" -spec: - type: ClusterIP - selector: {{- include "publisher-proxy.selectorLabels" . | nindent 4 }} - ports: - - protocol: TCP - port: 80 - targetPort: {{ .Values.metrics.config.port }} - name: {{ .Values.global.ports.namePrefix }}{{ .Values.metrics.config.portName }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "publisher-proxy.fullname" . }}-health - labels: {{- include "publisher-proxy.labels" . | nindent 4 }} -spec: - type: ClusterIP - selector: {{- include "publisher-proxy.selectorLabels" . | nindent 4 }} - ports: - - name: {{ .Values.global.ports.namePrefix }}{{ .Values.global.istio.proxy.portName }} - protocol: TCP - port: {{ .Values.global.istio.proxy.statusPort }} - targetPort: {{ .Values.global.istio.proxy.statusPort }} diff --git a/resources/eventing/charts/publisher-proxy/templates/serviceaccount.yaml b/resources/eventing/charts/publisher-proxy/templates/serviceaccount.yaml deleted file mode 100644 index 9a1a931d87ab..000000000000 --- a/resources/eventing/charts/publisher-proxy/templates/serviceaccount.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "publisher-proxy.serviceAccountName" . }} - labels: {{- include "publisher-proxy.labels" . | nindent 4 }} diff --git a/resources/eventing/charts/publisher-proxy/values.yaml b/resources/eventing/charts/publisher-proxy/values.yaml deleted file mode 100644 index e0914b8cdefa..000000000000 --- a/resources/eventing/charts/publisher-proxy/values.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# Default values for event-publisher-proxy. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -# replicaCount configures the number of replicas for the event-publisher-proxy deployment -replicaCount: 1 - -serviceAccount: - # name defines optionally another name than the default name for the service account - name: "" - -metrics: - config: - port: 9090 - portName: metrics - nameSuffix: "-metrics" - interval: 30s - -publisherProxy: - config: - port: 8080 - portName: client diff --git a/resources/eventing/profile-evaluation.yaml b/resources/eventing/profile-evaluation.yaml deleted file mode 100644 index 36fd05710917..000000000000 --- a/resources/eventing/profile-evaluation.yaml +++ /dev/null @@ -1,51 +0,0 @@ -global: - jetstream: - storage: file - maxBytes: 700Mi - fileStorage: - size: 1Gi - -controller: - jetstream: - retentionPolicy: interest - streamReplicas: 1 - consumerDeliverPolicy: new - maxMessages: -1 - resources: - limits: - cpu: 20m - memory: 256Mi - requests: - cpu: 1m - memory: 32Mi - publisherProxy: - replicas: 1 - resources: - limits: - cpu: 10m - memory: 32Mi - requests: - cpu: 1m - memory: 16Mi - -nats: - cluster: - enabled: false - replicas: 1 - reloader: - enabled: false - nats: - jetstream: - memStorage: - enabled: true - size: 64Mi - resources: - limits: - cpu: 20m - memory: 64Mi - requests: - cpu: 1m - memory: 16Mi - logging: - debug: true - trace: true diff --git a/resources/eventing/profile-production.yaml b/resources/eventing/profile-production.yaml deleted file mode 100644 index 60d8f5fe148f..000000000000 --- a/resources/eventing/profile-production.yaml +++ /dev/null @@ -1,51 +0,0 @@ -global: - jetstream: - storage: file - maxBytes: 700Mi - fileStorage: - size: 1Gi - -controller: - jetstream: - retentionPolicy: interest - streamReplicas: 3 - consumerDeliverPolicy: new - maxMessages: -1 - resources: - limits: - cpu: 500m - memory: 512Mi - requests: - cpu: 10m - memory: 64Mi - publisherProxy: - replicas: 1 - resources: - limits: - cpu: 500m - memory: 512Mi - requests: - cpu: 10m - memory: 64Mi - -nats: - cluster: - enabled: true - replicas: 3 - reloader: - enabled: false - nats: - jetstream: - memStorage: - enabled: true - size: 1Gi - resources: - limits: - cpu: 500m - memory: 1Gi - requests: - cpu: 10m - memory: 64Mi - logging: - debug: false - trace: false diff --git a/resources/eventing/templates/_helpers.tpl b/resources/eventing/templates/_helpers.tpl deleted file mode 100644 index f1d47207b627..000000000000 --- a/resources/eventing/templates/_helpers.tpl +++ /dev/null @@ -1,94 +0,0 @@ -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "eventing.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default "eventing" .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "eventing.labels" -}} -component: {{ .Release.Name }} -helm.sh/chart: {{ include "eventing.chart" . }} -{{ include "eventing.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{- define "eventing.postUpgrade.labels" -}} -component: {{ .Release.Name }} -job: post-upgrade-hook -{{- end }} - -{{- define "eventing.postInstall.labels" -}} -component: {{ .Release.Name }} -job: post-install-hook -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "eventing.selectorLabels" -}} -app.kubernetes.io/name: {{ include "eventing.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Expand the name of the chart. -*/}} -{{- define "eventing.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "eventing.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - - -{{/* -Create the name of the secret to use -*/}} -{{- define "eventing.secretName" -}} -{{ default (include "eventing.fullname" .) .Values.global.secretName }} -{{- end }} - -{{/* -Create a URL for container images -*/}} -{{- define "imageurl" -}} -{{- $registry := default $.reg.path $.img.containerRegistryPath -}} -{{- if hasKey $.img "directory" -}} -{{- printf "%s/%s/%s:%s" $registry $.img.directory $.img.name $.img.version -}} -{{- else -}} -{{- printf "%s/%s:%s" $registry $.img.name $.img.version -}} -{{- end -}} -{{- end -}} - -{{/* -Create a URL for container images, without version number -*/}} -{{- define "shortimageurl" -}} -{{- $registry := default $.reg.path $.img.containerRegistryPath -}} -{{- if hasKey $.img "directory" -}} -{{- printf "%s/%s/%s" $registry $.img.directory $.img.name -}} -{{- else -}} -{{- printf "%s/%s" $registry $.img.name -}} -{{- end -}} -{{- end -}} diff --git a/resources/eventing/templates/configmap.yaml b/resources/eventing/templates/configmap.yaml deleted file mode 100644 index cd53fabd5ddf..000000000000 --- a/resources/eventing/templates/configmap.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Values.global.configMap.name }} - labels: {{ include "eventing.labels" . | nindent 4 }} -data: - {{ .Values.global.configMap.keys.eventTypePrefix }}: {{ .Values.global.eventTypePrefix | quote }} ---- diff --git a/resources/eventing/templates/legacy-eventing-secret.yaml b/resources/eventing/templates/legacy-eventing-secret.yaml deleted file mode 100644 index e0158950b4b5..000000000000 --- a/resources/eventing/templates/legacy-eventing-secret.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# TODO: Legacy eventing secret which is being used by console-backend needs to be removed later -# https://github.com/kyma-project/kyma/issues/11328 -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "eventing.secretName" . }} - labels: {{- include "eventing.labels" . | nindent 4 }} \ No newline at end of file diff --git a/resources/eventing/templates/priority-class.yaml b/resources/eventing/templates/priority-class.yaml deleted file mode 100644 index 36b18e655146..000000000000 --- a/resources/eventing/templates/priority-class.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: scheduling.k8s.io/v1 -kind: PriorityClass -metadata: - name: {{ .Values.global.priorityClassName }} -value: 2000000 -globalDefault: false -description: "Global (default) scheduling priority of Kyma components. Must not be blocked by unschedulable user workloads." diff --git a/resources/eventing/values.yaml b/resources/eventing/values.yaml deleted file mode 100644 index aec72f6f1b29..000000000000 --- a/resources/eventing/values.yaml +++ /dev/null @@ -1,100 +0,0 @@ -# globally shared values among Helm subcharts -global: - containerRegistry: - path: europe-docker.pkg.dev/kyma-project - images: - eventing_controller: - name: eventing-controller - version: v20231030-427fa2f8 - directory: prod - pullPolicy: "IfNotPresent" - publisher_proxy: - name: event-publisher-proxy - version: v20231025-3f5d1600 - directory: prod - certHandler: - name: eventing-webhook-certificates - version: 1.7.0 - directory: prod - nats: - name: nats - version: v20230620-2.9.18-alpine3.18 - directory: prod/external - nats_config_reloader: - name: natsio/nats-server-config-reloader - version: 0.12.0 - directory: prod/external - prometheus_nats_exporter: - name: natsio/prometheus-nats-exporter - version: 0.12.0 - directory: prod/external - - jetstream: - enabled: true # If set to `false` then NATS resources will not be deployed to the cluster. - # Storage type of the stream, memory or file. - storage: file - fileStorage: - size: 1Gi - maxBytes: 700Mi - discardPolicy: new - # podManagementPolicy controls how pods are created during initial scale up, - # when replacing pods on nodes, or when scaling down. - podManagementPolicy: Parallel - - priorityClassName: "eventing-priority-class" - - # secretName defines optionally another name than the default secret name - secretName: "" - - # domainName is the global domain used in Kyma - domainName: "kyma.example.com" - - ports: - namePrefix: http- - - istio: - proxy: - statusPort: 15020 - portName: status - - podSecurityContext: - fsGroup: 10001 - runAsUser: 10001 - runAsGroup: 10001 - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - - containerSecurityContext: - privileged: false - allowPrivilegeEscalation: false - runAsNonRoot: true - capabilities: - drop: - - ALL - - # eventTypePrefix is an optional prefix for the eventType - # note that the eventType format is: eventTypePrefix.applicationName.eventName.eventVersion - # for example: sap.kyma.custom.myapp.order.created.v1 (where the eventName is order.created) - eventTypePrefix: "sap.kyma.custom" - - log: - format: "json" - level: "info" - - configMap: - name: eventing - keys: - eventTypePrefix: "eventTypePrefix" - -authentication: - # oauthClientId is the Oauth2 client id used in order to get an Oauth2 token from BEB - oauthClientId: "" - # oauthClientSecret is the Oauth2 secret used in order to get an Oauth2 token from BEB - oauthClientSecret: "" - # oauthTokenEndpoint is the Oauth2 endpoint from BEB from where Oauth2 tokens can be retrieved - oauthTokenEndpoint: "" - # publishUrl is the URL for publishing events to BEB - publishUrl: "" - # bebNamespace is the name of the namespace BEB is provisioned with - bebNamespace: ""