diff --git a/samples/kubernetes/helm/README.md b/samples/kubernetes/helm/README.md index 9fd1f83..ae0c0dd 100644 --- a/samples/kubernetes/helm/README.md +++ b/samples/kubernetes/helm/README.md @@ -6,13 +6,6 @@ The external ElasticSearch, as well as the Terracotta Server (needed in case of be started by the Helm chart. -# Cluster deployment - -The [cluster-deployment](cluster-deployment) folder provides a Helm chart that will startup an API Gateway cluster together with an external -ElasticSearch cluster, a separate Kibana instance, and a Terracotta Server (active/passive setup). The chart is supposed to provide a quick -start for trial and demo purposes, and it can of course also serve as a first step when setting up a production scenario. - - # Peer-to-peer cluster deployment Since version v10.11 API Gateways has the option to run as a peer-to-peer cluster, which in particular means there is no need to run diff --git a/samples/kubernetes/helm/cluster-deployment/README.md b/samples/kubernetes/helm/cluster-deployment/README.md deleted file mode 100644 index c16a565..0000000 --- a/samples/kubernetes/helm/cluster-deployment/README.md +++ /dev/null @@ -1,114 +0,0 @@ -# Helm chart for cluster deployment - -## Usage - -In order to setup an API Gateway cluster: - -* download the chart from the [apigateway](apigateway) folder, -* follow the instructions in the [chart readme](apigateway/README.md) to provide Helm values, -* finally run `helm install my-helm-release apigateway -f my-values.yaml`. - -By default the chart pulls these images: -* the API Gateway trial image from [Dockerhub](https://hub.docker.com/_/softwareag-apigateway), -* the Terracotta Bigmemory Max trial image from [Dockerhub](https://hub.docker.com/_/software-ag-bigmemory-max), -* the open source images for ElasticSearch and Kibana from the [ElasticSearch Docker repository](https://www.docker.elastic.co/). - -## Technical details - -This section explains some technical details, in case it is intended to modify or extend the chart. - -### Chart layout - -The top level `apigateway` chart depends on the subcharts `elasticsearchkibana` and `terracotta` which encapsulate the Kubernetes -manifests for ElasticSearch/Kibana and Terracotta, respectively. With this separation it should be easier to exchange the setup -of one of the components if desired. - -The top level chart can access values from the subcharts. In Helm this is achieved by prefixing the value's name from the subchart `values.yaml` -with the subchart name. For example, the API Gateway deployment addresses the Terracotta port as `.Values.terracotta.port`. - -### License files - -As described in the API Gateway [chart readme](apigateway/README.md) licenses first of all need to be provided as Kubernetes configmaps. -The configmaps are then used by volume mappings to override the default license file location within the Docker image. Thus any -existing default or trial license will be overwritten. - -For example, it looks like this for the API Gateway license: - -``` -apiVersion: apps/v1 -kind: Deployment -spec: - template: - spec: - containers: - - volumeMounts: - - name: apigw-license - mountPath: /opt/softwareag/IntegrationServer/instances/{{ .Values.global.integrationServerInstanceName }}/config/licenseKey.xml - subPath: licenseKey.xml - readOnly: false - volumes: - - name: apigw-license - configMap: - name: {{ .Values.apigwLicenseConfig }} - defaultMode: 0666 - items: - - key: {{ .Values.apigwLicenseFilename }} - path: licenseKey.xml -``` - -### API Gateway configuration - -The API Gateway configuration is provided using externalized configuration files. The master configuration file `config-sources.yml` and the -externalized configuration files are defined in a configmap, which in turn is referenced by a volume mapping which overrides the corresponding -default folder within the Docker image. - -There is one exception to this: The Terracotta cluster name and cluster URLs are defined as environment variables directly inside the API Gateway -deployment. - -### Init containers - -Both the API Gateway and the Kibana containers depend on ElasticSearch being ready. In order to achieve a smooth startup of the cluster as a -whole API Gateway and Kibana come with an init container. The init container basically has a sleep/retry loop that uses a simple curl command -to check whether ElasticSearch is ready. The init container will stop once ElasticSearch responds successfully. - -### Access to the API Gateway cluster - -By default, this chart establishes an Ingress to provide access to the API Gateway UI and runtime ports from outside the Kubernetes cluster. -The Ingress refers to services which in turn refer to the API Gateway pods. Due to the API Gateway UI requiring sticky sessions ([see also below](#sticky-ui-sessions)) the Ingress -is configured accordingly. However this default setup works only if the Kubernetes cluster runs with the wide-spread nginx-ingress controller which -can handle sticky sessions. - -If the nginx-ingress controller is not present, or another ingress controller is preferred, an accordingly configured external load balancer can be used to -achieve sticky sessions. The chart can easily be switched to use a load balancer, for details see the [chart readme](apigateway/README.md). -When doing so, the chart will still establish an Ingress which then refers to the load balancer service, and the load balancer in turn is -configured as a proxy for the API Gateway services. - -For the latter purpose the chart comes with an nginx deployment and appropriate configuration. Please note that API Gateway does not -rely on or prefer nginx. In order to use a different load balancer the chart needs to be adapted manually: replace the `nginx-*.yaml` files -in the [template folder](apigateway/templates) as desired, and keep in mind to configure the load balancer with sticky sessions for the -API Gateway UI port. - -### Sticky UI sessions - -The API Gateway web interface requires sticky sessions in order to function correctly. This is achieved by configuring the API Gateway service -for the UI port as well as the Ingress with sticky behaviour. The relevant parts of the service and the Ingress look like this: - -``` ---- -# apigateway-ui-svc.yaml -apiVersion: v1 -kind: Service -spec: - sessionAffinity: ClientIP - sessionAffinityConfig: - clientIP: - timeoutSeconds: 1000 - ---- -# apigateway-ingress.yaml -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - annotations: - nginx.ingress.kubernetes.io/affinity: "cookie" -``` \ No newline at end of file diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/Chart.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/Chart.yaml deleted file mode 100644 index bcd28d8..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ -apiVersion: v1 -appVersion: "1.0" -description: APIGateway Helm chart for Kubernetes -name: api-gateway -version: 0.1.0 diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/README.md b/samples/kubernetes/helm/cluster-deployment/apigateway/README.md deleted file mode 100644 index a88d214..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/README.md +++ /dev/null @@ -1,180 +0,0 @@ -# API Gateway Cluster Helm Chart - -This chart sets up an API Gateway cluster which by default consists of -* 3 API Gateway cluster nodes, -* an ElasticSearch cluster with 3 nodes, -* 2 Kibana nodes, -* a Terracotta cluster with 2 nodes, -* 1 Ingress providing public access to the API Gateay UI and runtime ports. - -The chart is organized as a top-level chart for API Gateway itself, and subcharts for -ElasticSearch/Kibana and Terracotta. The corresponding `values.yaml` files contain -default values where possible. In some cases there is no meaningful default, these values -need to be injected from outside, see the [Required Values](#required-values) section below. - -Once the prerequisites are fulfilled and the required values as well as any optional values have been provided run helm: - -``` -helm install apigateway -f my-values.yaml -``` - -# Prerequisites - -## Licenses - -Both API Gateway and Terracotta require license files. These licenses are supposed to be -provided as configmaps. - -Hence before running `helm install` create the configmaps: - -``` -kubectl create configmap tc-license-config --from-file=terracotta-license.key= -kubectl create configmap apigw-license-config --from-file=licenseKey.xml= -``` - -## Image Pull Secret - -Provide an image pull secret for the registry where the desired images for API Gateway, Terracotta BigMemory Max, -ElasticSearch, and Kibana are to be pulled from. - -``` -kubectl create secret docker-registry registry-credentials --docker-server= --docker-username= --docker-password= --docker-email= -``` - -# Template Values - -## Required Values - -For some of the values needed by the chart there is no meaningful default. These values need to be provided -explicitly when running `helm install`, for example in a separate file `my-values.yaml`: - -``` -# my-values.yaml -k8sClusterSuffix: " .. cluster suffix .. " -``` - -The cluster suffix must match the suffix of the URLs published by the Kubernetes cluster's Ingress Controller. -The suffix needs to start with a dot `.` character. - -## Trial Usage - -The charts are designed to provide a quick start for a trial evaluation or a product demo, as well as -provide a basis for setting up a production environment. - -The trial case (disabled by default) will often be run on a non-productive Kubernetes environment like -for example minikube, where persistent volumes are not always easily available. Therefore in trial mode, -ElastichSearch will be started without persistent volumes, which is good enough for the demo purpose. -Of course keep in mind that any data is lost once all ElastichSearch pods are shut down. - -In order to enable trial mode: - -``` -# my-values.yaml -global: - trialUsage: true -``` - -Just make sure _not_ to quote the value, the chart expects a boolean value. - -## Persistent Volume Claims - -The persistent volume claims for ElastichSearch do not specify a storage class by default. -In order to specify a particular storage class: - -``` -# my-values.yaml -elasticsearchkibana: - storageClassName: "my-storage-class" -``` - -The persistent volume claims request 50GiB of disk storage by default, i.e., for each ElastichSearch pod. -In order to adapt the disk storage request: - -``` -# my-values.yaml -elasticsearchkibana: - storageRequest: 100Gi -``` - -## Resource Requests and Limits - -All pod containers come with default settings for resource requests and limits. -These can be adapted, for example: - -``` -# my-values.yaml -resources: - apigwContainer: - requests: - cpu: 500m - memory: 4Gi - limits: - # use a high cpu limit to avaoid the container being throttled - cpu: 8 - memory: 8Gi - -elasticsearchkibana: - resources: - esContainer: - requests: - cpu: 500m - memory: 2Gi - limits: - # use a high cpu limit to avaoid the container being throttled - cpu: 8 - memory: 4Gi -``` - -## Using an external load balancer - -The Ingress provides two entrypoints for accessing the API Gateway cluster, one for the UI port to -allow access to the administration UI, and another one for the runtime port to allow for example REST access -to the services. - -The API Gateway UI requires session stickiness and therefore both the Ingress and the Kubernetes -service in front of the API Gateway pods are correspondingly configured. - -In some cases, typically if the nginx-ingress controller is not available in the Kubernetes system, the stickiness -settings are not correctly respected, and the API Gateway UI will not work. In particular the login to the UI -will fail. - -This can be handled by using an external load balancer which is configured to use the API Gateway as -backend. And the Ingress is then defined against the load balancer service. - -In order to enable the external load balancer: - -``` -# my-values.yaml -externalLoadBalancer: true -``` - -Just make sure _not_ to quote the value, the chart expects a boolean value. - -## Custom Prefix - -If desired a custom prefix can be specified which will be applied to the names of deployments, statefulsets, -replica sets, pods, services, config maps, and ingresses. - -Specify the custom prefix like this: - -``` -# my-values.yaml -global: - customPrefix: "myprefix" -``` - -Names will then look like this: - -``` -C:\>kubectl get pods -NAME READY STATUS RESTARTS AGE -myprefix-apigw-105-564f98cdcb-5wmwt 1/1 Running 0 20m -myprefix-apigw-105-564f98cdcb-9pf77 1/1 Running 0 20m -myprefix-apigw-105-564f98cdcb-w6684 1/1 Running 0 20m -myprefix-elasticsearch-ss-0 1/1 Running 0 20m -myprefix-elasticsearch-ss-1 1/1 Running 0 19m -myprefix-elasticsearch-ss-2 1/1 Running 0 19m -myprefix-kibana-ss-0 1/1 Running 0 20m -myprefix-terracotta-ss-0 1/1 Running 0 20m -myprefix-terracotta-ss-1 1/1 Running 0 19m -``` \ No newline at end of file diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/Chart.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/Chart.yaml deleted file mode 100644 index 5dfd219..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/Chart.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ -apiVersion: v2 -name: elasticsearchkibana -description: Helm chart for ElasticSearch in the context of an API Gateway cluster. - -type: application - -version: 0.1.0 - -appVersion: 1.0.0 diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/elasticsearch-configmap.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/elasticsearch-configmap.yaml deleted file mode 100644 index 9414342..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/elasticsearch-configmap.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.elasticSearchConfigmap }} - labels: - {{- include "apigateway.labels" . | nindent 4 }} -data: - elasticsearch.yml: | - cluster.name: SAG_APIGateway_Cluster - network.host: "0.0.0.0" - http.port: {{ int .Values.elasticSearchPort }} - transport.publish_port: {{ int .Values.elasticSearchPublishPort }} - bootstrap.memory_lock: false - discovery.seed_hosts: {{ include "apigateway.customPrefix" . }}{{ .Values.elasticSearchDiscoveryService }}:{{ int .Values.elasticSearchPublishPort }} - {{- $fullName := printf "%s%s" ( include "apigateway.customPrefix" . ) .Values.elasticSearchStatefulsetName }} - cluster.initial_master_nodes: {{ range $i, $e := until (int .Values.initialMasterCount) }}{{ $fullName }}-{{ $i }},{{ end }} \ No newline at end of file diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/elasticsearch-discovery-svc.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/elasticsearch-discovery-svc.yaml deleted file mode 100644 index db953b2..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/elasticsearch-discovery-svc.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: v1 -kind: Service -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.elasticSearchDiscoveryService }} - labels: - {{- include "apigateway.labels" . | nindent 4 }} -spec: - clusterIP: None - selector: - app: es-{{ .Values.global.app }} - ports: - - name: escluster - port: {{ int .Values.elasticSearchPublishPort }} \ No newline at end of file diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/elasticsearch-statefulset.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/elasticsearch-statefulset.yaml deleted file mode 100644 index 9f08913..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/elasticsearch-statefulset.yaml +++ /dev/null @@ -1,100 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.elasticSearchStatefulsetName }} - labels: - {{- include "apigateway.labels" . | nindent 4 }} -spec: - podManagementPolicy: OrderedReady - selector: - matchLabels: - app: es-{{ .Values.global.app }} - serviceName: {{ include "apigateway.customPrefix" . }}{{ .Values.elasticSearchDiscoveryService }} - replicas: {{ int .Values.clusterSize }} - updateStrategy: - type: RollingUpdate - template: - metadata: - labels: - app: es-{{ .Values.global.app }} - {{- include "apigateway.labels" . | nindent 8 }} - spec: - securityContext: - fsGroup: 1000 - initContainers: - - name: init-sysctl - image: {{ .Values.simpleLinuxImage }} - imagePullPolicy: IfNotPresent - resources: - {{- toYaml .Values.resources.esInitContainer | nindent 10 }} - securityContext: - privileged: true - command: ["sysctl", "-w", "vm.max_map_count=262144"] - containers: - - name: elasticsearch - image: {{ .Values.elasticImage }}:{{ .Values.elasticTag }} - imagePullPolicy: IfNotPresent - resources: - {{- toYaml .Values.resources.esContainer | nindent 10 }} - readinessProbe: - httpGet: - scheme: HTTP - path: /_cluster/health?local=true - port: {{ int .Values.elasticSearchPort }} - initialDelaySeconds: 5 - ports: - - containerPort: {{ int .Values.elasticSearchPort }} - name: es-http - - containerPort: {{ int .Values.elasticSearchPublishPort }} - name: es-transport - volumeMounts: - {{- if not .Values.global.trialUsage }} - - name: es-data - mountPath: /usr/share/elasticsearch/data - {{- end }} - - name: elasticsearch-config - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml - subPath: elasticsearch.yml - imagePullSecrets: - - name: {{ .Values.global.registryCredentialsName }} - volumes: - - name: elasticsearch-config - configMap: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.elasticSearchConfigmap }} - items: - - key: elasticsearch.yml - path: elasticsearch.yml - - {{- if not .Values.global.trialUsage }} - volumeClaimTemplates: - - metadata: - name: es-data - spec: - accessModes: [ "ReadWriteOnce" ] - {{- if .Values.storageClassName }} - storageClassName: {{ .Values.storageClassName | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.storageRequest }} - {{- end }} diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/elasticsearch-svc.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/elasticsearch-svc.yaml deleted file mode 100644 index 7e8f41d..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/elasticsearch-svc.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: v1 -kind: Service -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.elasticSearchService }} - labels: - {{- include "apigateway.labels" . | nindent 4 }} -spec: - selector: - app: es-{{ .Values.global.app }} - ports: - - name: http - port: {{ int .Values.elasticSearchPort }} - targetPort: {{ int .Values.elasticSearchPort }} diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/kibana-configmap.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/kibana-configmap.yaml deleted file mode 100644 index 870fdad..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/kibana-configmap.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.kibanaConfigmap }} - labels: - {{- include "apigateway.labels" . | nindent 4 }} -data: - kibana.yml: | - server.name: kibana-ss-0 - server.host: "0.0.0.0" - server.port: {{ int .Values.kibanaPort }} - elasticsearch.hosts: [ "http://{{ include "apigateway.customPrefix" . }}{{ .Values.elasticSearchService }}:{{ int .Values.elasticSearchPort }}" ] - console.enabled: false - server.basePath: "/apigatewayui/dashboardproxy" - kibana.index: "gateway_{{ .Values.global.integrationServerInstanceName }}_dashboard" diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/kibana-statefulset.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/kibana-statefulset.yaml deleted file mode 100644 index 7ee57ee..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/kibana-statefulset.yaml +++ /dev/null @@ -1,93 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: apps/v1 -kind: StatefulSet -metadata: - generation: 1 - labels: - app: kibana-apigateway - {{- include "apigateway.labels" . | nindent 4 }} - name: {{ include "apigateway.customPrefix" . }}kibana-ss -spec: - podManagementPolicy: OrderedReady - replicas: {{ .Values.kibanaCount }} - revisionHistoryLimit: 10 - selector: - matchLabels: - app: kibana-apigateway - serviceName: {{ include "apigateway.customPrefix" . }}{{ .Values.kibanaService }} - template: - metadata: - labels: - app: kibana-apigateway - {{- include "apigateway.labels" . | nindent 8 }} - spec: - initContainers: - - name: waitforelasticsearch - image: {{ .Values.global.curlImage }} - imagePullPolicy: IfNotPresent - resources: - {{- toYaml .Values.resources.kibanaInitContainer | nindent 10 }} - command: - - sh - - -ec - - | - pwd - whoami - ls -l - {{- $esUrl := printf "http://%s%s:%s/_cluster/health?pretty" ( include "apigateway.customPrefix" . ) .Values.elasticSearchService ( .Values.elasticSearchPort | toString) }} - curl -s {{ $esUrl }} | tee /tmp/tmpfile - until grep "number_of_nodes" /tmp/tmpfile | grep {{ int .Values.clusterSize }} || grep "status" /tmp/tmpfile | grep "green" ; do - echo "waiting for {{ include "apigateway.customPrefix" . }}{{ .Values.elasticSearchService }}: status not yet 'green', or 'number_of_nodes' not yet {{ int .Values.clusterSize }}" - sleep 2 - curl -s {{ $esUrl }} | tee /tmp/tmpfile - done - containers: - - name: kibana - env: - - name: app - value: kibana-apigateway - image: "{{ .Values.kibanaImage }}:{{ .Values.elasticTag }}" - imagePullPolicy: IfNotPresent - resources: - {{- toYaml .Values.resources.kibanaContainer | nindent 10 }} - readinessProbe: - tcpSocket: - port: {{ int .Values.kibanaPort }} - initialDelaySeconds: 5 - periodSeconds: 10 - ports: - - containerPort: {{ int .Values.kibanaPort }} - name: kibana - protocol: TCP - volumeMounts: - - name: kibana-config - mountPath: /usr/share/kibana/config - dnsPolicy: ClusterFirst - restartPolicy: Always - schedulerName: default-scheduler - terminationGracePeriodSeconds: 30 - volumes: - - name: kibana-config - configMap: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.kibanaConfigmap }} - updateStrategy: - type: RollingUpdate diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/kibana-svc.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/kibana-svc.yaml deleted file mode 100644 index 734f345..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/templates/kibana-svc.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: v1 -kind: Service -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.kibanaService }} - labels: - app: kibana-apigateway - {{- include "apigateway.labels" . | nindent 4 }} -spec: - ports: - - name: kibana - port: {{ int .Values.kibanaPort }} - protocol: TCP - targetPort: {{ int .Values.kibanaPort }} - selector: - app: kibana-apigateway - sessionAffinity: None diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/values.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/values.yaml deleted file mode 100644 index a9b7f6f..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/elasticsearchkibana/values.yaml +++ /dev/null @@ -1,83 +0,0 @@ -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -elasticSearchStatefulsetName: "elasticsearch-ss" -elasticSearchService: "elasticsearch-service" -elasticSearchPort: 9200 -elasticSearchPublishPort: 9300 - -elasticSearchDiscoveryService: "elasticsearch-discovery-service" - -kibanaService: "kibana-service" -kibanaPort: 9405 - -elasticSearchConfigmap: "es-config" -kibanaConfigmap: "kibana-config" - -elasticImage: "docker.elastic.co/elasticsearch/elasticsearch-oss" -kibanaImage: "docker.elastic.co/kibana/kibana-oss" -elasticTag: "7.2.0" - - -clusterSize: 3 -initialMasterCount: 3 -kibanaCount: 2 - -storageClassName: "" -storageRequest: 50Gi - - -simpleLinuxImage: "busybox" - - -resources: - - esInitContainer: - requests: - cpu: 100m - memory: 50Mi - limits: - cpu: 1 - memory: 1Gi - - esContainer: - requests: - cpu: 500m - memory: 2Gi - limits: - # use a high cpu limit to avaoid the container being throttled - cpu: 8 - memory: 4Gi - - kibanaInitContainer: - requests: - cpu: 100m - memory: 50Mi - limits: - cpu: 1 - memory: 1Gi - - kibanaContainer: - requests: - cpu: 500m - memory: 2Gi - limits: - # use a high cpu limit to avaoid the container being throttled - cpu: 8 - memory: 4Gi \ No newline at end of file diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/Chart.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/Chart.yaml deleted file mode 100644 index c67a900..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/Chart.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: v2 -name: terracotta -description: Helm chart for Terracotta in the context of an API Gateway cluster. - -type: application - -version: 0.1.0 - -appVersion: 1.0.0 diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/templates/terracotta-configmap.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/templates/terracotta-configmap.yaml deleted file mode 100644 index 94cabaa..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/templates/terracotta-configmap.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.tcConfig }} - labels: - {{- include "apigateway.labels" . | nindent 4 }} -data: - tc-config.xml: | - - - - {{- $fullSsName := printf "%s%s" ( include "apigateway.customPrefix" . ) .Values.statefulsetName }} - {{- $fullServiceName := printf "%s%s" ( include "apigateway.customPrefix" . ) .Values.serviceName }} - - stdout: - {{ .Values.port }} - {{ .Values.syncPort }} - - - /stdout: - {{ .Values.port }} - {{ .Values.syncPort }} - - 120 - - diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/templates/terracotta-headless-svc.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/templates/terracotta-headless-svc.yaml deleted file mode 100644 index dd90b19..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/templates/terracotta-headless-svc.yaml +++ /dev/null @@ -1,39 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: v1 -kind: Service -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.serviceName }} - labels: - app: terracotta - {{- include "apigateway.labels" . | nindent 4 }} - annotations: - # see https://github.com/kubernetes/kubernetes/issues/39363 , to have dns entries available immediately - service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" -spec: - ports: - - name: terracotta-port - port: {{ .Values.port }} - - name: sync-port - port: {{ .Values.syncPort }} - clusterIP: None - selector: - app: terracotta diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/templates/terracotta-statefulset.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/templates/terracotta-statefulset.yaml deleted file mode 100644 index 784b29c..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/templates/terracotta-statefulset.yaml +++ /dev/null @@ -1,83 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.statefulsetName }} - labels: - {{- include "apigateway.labels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: terracotta - serviceName: {{ include "apigateway.customPrefix" . }}{{ .Values.serviceName }} - replicas: 2 - template: - metadata: - labels: - app: terracotta - {{- include "apigateway.labels" . | nindent 8 }} - spec: - containers: - - name: terracotta-container - image: {{ .Values.terracottaImage }}:{{ .Values.terracottaTag }} - command: ["bin/start-tc-server.sh"] - args: ["-f", "/config/tc-config.xml", "-n", "$(POD_NAME)"] - imagePullPolicy: IfNotPresent - - resources: - {{- toYaml .Values.resources.terracottaContainer | nindent 10 }} - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - ports: - - containerPort: {{ .Values.port }} - name: terracotta-port - - containerPort: {{ .Values.syncPort }} - name: sync-port - volumeMounts: - - name: config-volume - mountPath: /config/tc-config.xml - subPath: tc-config.xml - readOnly: false - - name: license-volume - mountPath: /licenses/license.key - subPath: terracotta-license.key - readOnly: false - imagePullSecrets: - - name: {{ .Values.global.registryCredentialsName }} - volumes: - - name: config-volume - configMap: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.tcConfig }} - defaultMode: 0666 - items: - - key: tc-config.xml - path: tc-config.xml - - name: license-volume - configMap: - name: {{ .Values.tcLicenseConfig }} - defaultMode: 0666 - items: - - key: {{ .Values.tcLicenseFilename }} - path: terracotta-license.key \ No newline at end of file diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/values.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/values.yaml deleted file mode 100644 index cf45c9e..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/charts/terracotta/values.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - - -statefulsetName: "terracotta-ss" -serviceName: "terracotta-headless-service" -port: 9410 -syncPort: 9430 - - -terracottaImage: "store/softwareag/bigmemorymax-server" -terracottaTag: "4.3.9" - -tcConfig: "tc-config" - -tcLicenseConfig: "tc-license-config" -tcLicenseFilename: "terracotta-license.key" - - -resources: - - terracottaContainer: - requests: - cpu: 500m - memory: 2Gi - limits: - # use a high cpu limit to avaoid the container being throttled - cpu: 8 - memory: 4Gi \ No newline at end of file diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/_helpers.tpl b/samples/kubernetes/helm/cluster-deployment/apigateway/templates/_helpers.tpl deleted file mode 100644 index 2260825..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/_helpers.tpl +++ /dev/null @@ -1,50 +0,0 @@ -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ -{{/* -Expand the name of the chart. -*/}} -{{- define "apigateway.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "apigateway.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "apigateway.labels" -}} -helm.sh/chart: {{ include "apigateway.chart" . }} -app.kubernetes.io/name: {{ include "apigateway.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Custom prefix -*/}} -{{- define "apigateway.customPrefix" }} -{{- if .Values.global.customPrefix }} -{{- printf "%s-" .Values.global.customPrefix }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-configmap.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-configmap.yaml deleted file mode 100644 index b0db486..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-configmap.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.apigwConfigmap }} - labels: - {{- include "apigateway.labels" . | nindent 4 }} - -data: - config-sources.yml: | - sources: - - type: YAML - allowEdit: true - properties: - location: elasticsearch.yml - - elasticsearch.yml: | - apigw: - elasticsearch: - hosts: {{ include "apigateway.customPrefix" . }}{{ .Values.elasticsearchkibana.elasticSearchService }}:{{ int .Values.elasticsearchkibana.elasticSearchPort }} - autostart: false - kibana: - dashboardInstance: http://{{ include "apigateway.customPrefix" . }}{{ .Values.elasticsearchkibana.kibanaService }}:{{ .Values.elasticsearchkibana.kibanaPort }} - autostart: false diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-deployment.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-deployment.yaml deleted file mode 100644 index c461597..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-deployment.yaml +++ /dev/null @@ -1,147 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: {{ .Values.global.app }} - {{- include "apigateway.labels" . | nindent 4 }} - name: {{ include "apigateway.customPrefix" . }}apigateway -spec: - replicas: {{ .Values.apigwClusterSize }} - selector: - matchLabels: - app: {{ .Values.global.app }} - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: {{ .Values.global.app }} - {{- include "apigateway.labels" . | nindent 8 }} - spec: - initContainers: - - name: waitforelasticsearch - image: {{ .Values.global.curlImage }} - imagePullPolicy: IfNotPresent - resources: - {{- toYaml .Values.resources.apigwInitContainer | nindent 10 }} - command: - - sh - - -ec - - | - pwd - whoami - ls -l - {{- $esUrl := printf "http://%s%s:%s/_cluster/health?pretty" ( include "apigateway.customPrefix" . ) .Values.elasticsearchkibana.elasticSearchService ( .Values.elasticsearchkibana.elasticSearchPort | toString) }} - curl -s {{ $esUrl }} | tee /tmp/tmpfile - until grep "number_of_nodes" /tmp/tmpfile | grep {{ int .Values.elasticsearchkibana.elasticClusterSize }} || grep "status" /tmp/tmpfile | grep "green" ; do - echo "waiting for {{ include "apigateway.customPrefix" . }}{{ .Values.elasticsearchkibana.elasticSearchService }}: status not yet 'green', or 'number_of_nodes' not yet {{ int .Values.elasticsearchkibana.elasticClusterSize }}" - sleep 2 - curl -s {{ $esUrl }} | tee /tmp/tmpfile - done - containers: - - name: {{ .Values.global.app }} - env: - - name: apigw_cluster_tsaUrls - {{- $fullSsName := printf "%s%s" ( include "apigateway.customPrefix" . ) .Values.terracotta.statefulsetName }} - {{- $fullServiceName := printf "%s%s" ( include "apigateway.customPrefix" . ) .Values.terracotta.serviceName }} - value: "{{ $fullSsName }}-0.{{ $fullServiceName }}.{{ .Release.Namespace }}.svc.cluster.local:{{ int .Values.terracotta.port }},{{ $fullSsName }}-1.{{ $fullServiceName }}.{{ .Release.Namespace }}.svc.cluster.local:{{ int .Values.terracotta.port }}" - - name: apigw_cluster_name - value: APIGatewayTSAcluster - image: {{ .Values.apigwImage }}:{{ .Values.apigwTag }} - imagePullPolicy: IfNotPresent - resources: - {{- toYaml .Values.resources.apigwContainer | nindent 10 }} - ports: - - containerPort: {{ int .Values.apigwRuntimePort }} - name: rt-port - protocol: TCP - - containerPort: 9999 - name: diag-port - protocol: TCP - - containerPort: {{ int .Values.apigwUiPort }} - name: ui-http - protocol: TCP - - livenessProbe: - tcpSocket: - port: {{ int .Values.apigwRuntimePort }} - failureThreshold: 3 - initialDelaySeconds: 120 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 1 - - readinessProbe: - httpGet: - path: /rest/apigateway/health - port: {{ int .Values.apigwRuntimePort }} - scheme: HTTP - failureThreshold: 3 - initialDelaySeconds: 30 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 1 - - volumeMounts: - - name: apigw-config - mountPath: /opt/softwareag/IntegrationServer/instances/{{ .Values.global.integrationServerInstanceName }}/packages/WmAPIGateway/resources/configuration - - name: apigw-license - mountPath: /opt/softwareag/IntegrationServer/instances/{{ .Values.global.integrationServerInstanceName }}/config/licenseKey.xml - subPath: licenseKey.xml - readOnly: false - - name: terracotta-license - mountPath: /opt/softwareag/common/conf/terracotta-license.key - subPath: terracotta-license.key - readOnly: false - imagePullSecrets: - - name: {{ .Values.global.registryCredentialsName }} - dnsPolicy: ClusterFirst - restartPolicy: Always - schedulerName: default-scheduler - terminationGracePeriodSeconds: 30 - volumes: - - name: apigw-config - configMap: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.apigwConfigmap }} - items: - - key: config-sources.yml - path: config-sources.yml - - key: elasticsearch.yml - path: elasticsearch.yml - - name: apigw-license - configMap: - name: {{ .Values.apigwLicenseConfig }} - defaultMode: 0666 - items: - - key: {{ .Values.apigwLicenseFilename }} - path: licenseKey.xml - - name: terracotta-license - configMap: - name: {{ .Values.terracotta.tcLicenseConfig }} - defaultMode: 0666 - items: - - key: {{ .Values.terracotta.tcLicenseFilename }} - path: terracotta-license.key \ No newline at end of file diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-ingress.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-ingress.yaml deleted file mode 100644 index 4d85995..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-ingress.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.global.app }}-ingress - labels: - {{- include "apigateway.labels" . | nindent 4 }} - annotations: - nginx.ingress.kubernetes.io/affinity: "cookie" -spec: - rules: - - host: {{ .Values.global.app }}-rt-{{ .Release.Namespace }}{{ .Values.k8sClusterSuffix }} - http: - paths: - - backend: - serviceName: {{ include "apigateway.customPrefix" . }}{{ .Values.externalLoadBalancer | ternary .Values.nginxService .Values.apigwRtService }} - servicePort: {{ int .Values.apigwRuntimePort }} - path: / - - host: {{ .Values.global.app }}-ui-{{ .Release.Namespace }}{{ .Values.k8sClusterSuffix }} - http: - paths: - - backend: - serviceName: {{ include "apigateway.customPrefix" . }}{{ .Values.externalLoadBalancer | ternary .Values.nginxService .Values.apigwUiService }} - servicePort: {{ int .Values.apigwUiPort }} - path: / \ No newline at end of file diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-rt-svc.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-rt-svc.yaml deleted file mode 100644 index bd03b7f..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-rt-svc.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: v1 -kind: Service -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.apigwRtService }} - labels: - app: {{ .Values.global.app }} - {{- include "apigateway.labels" . | nindent 4 }} - -spec: - type: {{ .Values.serviceType }} - ports: - - port: {{ int .Values.apigwRuntimePort }} - protocol: TCP - targetPort: {{ int .Values.apigwRuntimePort }} - name: httpport - - port: 9999 - protocol: TCP - targetPort: 9999 - name: diagport - selector: - app: {{ .Values.global.app }} diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-ui-svc.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-ui-svc.yaml deleted file mode 100644 index 890ca20..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/apigateway-ui-svc.yaml +++ /dev/null @@ -1,40 +0,0 @@ ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: v1 -kind: Service -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.apigwUiService }} - labels: - app: {{ .Values.global.app }} - {{- include "apigateway.labels" . | nindent 4 }} -spec: - type: {{ .Values.serviceType }} - ports: - - port: {{ int .Values.apigwUiPort }} - protocol: TCP - targetPort: {{ int .Values.apigwUiPort }} - name: uiport - selector: - app: {{ .Values.global.app }} - sessionAffinity: ClientIP - sessionAffinityConfig: - clientIP: - timeoutSeconds: 1000 diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/nginx-configmap.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/templates/nginx-configmap.yaml deleted file mode 100644 index 909122f..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/nginx-configmap.yaml +++ /dev/null @@ -1,77 +0,0 @@ -{{- if .Values.externalLoadBalancer }} ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.nginxConfigmap }} - labels: - {{- include "apigateway.labels" . | nindent 4 }} - -data: - nginx.conf: | - user nginx; - worker_processes 1; - error_log /var/log/nginx/error.log debug; - pid /var/run/nginx.pid; - - events { - worker_connections 1024; - } - - http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - - sendfile on; - #tcp_nopush on; - keepalive_timeout 65; - gzip on; - - upstream apigateway-rt { - server {{ include "apigateway.customPrefix" . }}{{ .Values.apigwRtService }}:{{ int .Values.apigwRuntimePort }}; - } - - upstream apigateway-ui { - server {{ include "apigateway.customPrefix" . }}{{ .Values.apigwUiService }}:{{ int .Values.apigwUiPort }}; - } - - server { - listen {{ int .Values.apigwRuntimePort }}; - location / { - proxy_pass http://apigateway-rt; - } - } - - server { - listen {{ int .Values.apigwUiPort }}; - location / { - proxy_pass http://apigateway-ui; - } - } - } -{{- end }} \ No newline at end of file diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/nginx-deployment.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/templates/nginx-deployment.yaml deleted file mode 100644 index 3c424cf..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/nginx-deployment.yaml +++ /dev/null @@ -1,74 +0,0 @@ -{{- if .Values.externalLoadBalancer }} ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: nginx - {{- include "apigateway.labels" . | nindent 4 }} - name: {{ include "apigateway.customPrefix" . }}nginx -spec: - replicas: 1 - selector: - matchLabels: - app: nginx - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - creationTimestamp: null - labels: - app: nginx - {{- include "apigateway.labels" . | nindent 8 }} - spec: - containers: - - name: nginx - image: nginx - imagePullPolicy: IfNotPresent - resources: - {{- toYaml .Values.resources.nginxContainer | nindent 10 }} - ports: - - containerPort: {{ int .Values.apigwRuntimePort }} - name: rt-port - protocol: TCP - - containerPort: {{ int .Values.apigwUiPort }} - name: ui-http - protocol: TCP - volumeMounts: - - name: nginx-config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - readOnly: false - imagePullSecrets: - - name: {{ .Values.global.registryCredentialsName }} - - volumes: - - name: nginx-config - configMap: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.nginxConfigmap }} - items: - - key: nginx.conf - path: nginx.conf -{{- end }} \ No newline at end of file diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/nginx-svc.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/templates/nginx-svc.yaml deleted file mode 100644 index e0417e0..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/templates/nginx-svc.yaml +++ /dev/null @@ -1,43 +0,0 @@ -{{- if .Values.externalLoadBalancer }} ---- -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -apiVersion: v1 -kind: Service -metadata: - name: {{ include "apigateway.customPrefix" . }}{{ .Values.nginxService }} - labels: - app: {{ .Values.global.app }} - {{- include "apigateway.labels" . | nindent 4 }} - -spec: - type: {{ .Values.serviceType }} - ports: - - port: {{ int .Values.apigwRuntimePort }} - protocol: TCP - targetPort: {{ int .Values.apigwRuntimePort }} - name: rtport - - port: {{ int .Values.apigwUiPort }} - protocol: TCP - targetPort: {{ int .Values.apigwUiPort }} - name: uiport - selector: - app: nginx -{{- end }} \ No newline at end of file diff --git a/samples/kubernetes/helm/cluster-deployment/apigateway/values.yaml b/samples/kubernetes/helm/cluster-deployment/apigateway/values.yaml deleted file mode 100644 index 1066a5b..0000000 --- a/samples/kubernetes/helm/cluster-deployment/apigateway/values.yaml +++ /dev/null @@ -1,77 +0,0 @@ -# /* -# * Copyright (c) 2021 Software AG, Darmstadt, Germany and/or its licensors -# * -# * SPDX-License-Identifier: Apache-2.0 -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# * -# */ - -global: - app: apigateway - integrationServerInstanceName: default - curlImage: "curlimages/curl" - trialUsage: false - registryCredentialsName: registry-credentials - -apigwClusterSize: 3 - -apigwImage: "store/softwareag/apigateway-trial" -apigwTag: "10.11" - -apigwUiService: "apigw-ui-svc" -apigwRtService: "apigw-rt-svc" - -apigwRuntimePort: 5555 -apigwUiPort: 9072 - -apigwConfigmap: "apigw-config" -nginxConfigmap: "nginx-config" - -apigwLicenseConfig: "apigw-license-config" -apigwLicenseFilename: "licenseKey.xml" - -k8sClusterSuffix: "specify-the-cluster-suffix-for-ingress-urls" - - -externalLoadBalancer: false -nginxService: "nginx-service" - - -resources: - - apigwInitContainer: - requests: - cpu: 100m - memory: 50Mi - limits: - cpu: 1 - memory: 1Gi - - apigwContainer: - requests: - cpu: 500m - memory: 4Gi - limits: - # use a high cpu limit to avaoid the container being throttled - cpu: 8 - memory: 8Gi - - nginxContainer: - requests: - cpu: 500m - memory: 2Gi - limits: - # use a high cpu limit to avaoid the container being throttled - cpu: 8 - memory: 4Gi \ No newline at end of file diff --git a/samples/kubernetes/helm/peer-to-peer-cluster-deployment/apigateway/charts/elasticsearchkibana/templates/kibana-configmap.yaml b/samples/kubernetes/helm/peer-to-peer-cluster-deployment/apigateway/charts/elasticsearchkibana/templates/kibana-configmap.yaml index 870fdad..048733b 100644 --- a/samples/kubernetes/helm/peer-to-peer-cluster-deployment/apigateway/charts/elasticsearchkibana/templates/kibana-configmap.yaml +++ b/samples/kubernetes/helm/peer-to-peer-cluster-deployment/apigateway/charts/elasticsearchkibana/templates/kibana-configmap.yaml @@ -30,6 +30,4 @@ data: server.host: "0.0.0.0" server.port: {{ int .Values.kibanaPort }} elasticsearch.hosts: [ "http://{{ include "apigateway.customPrefix" . }}{{ .Values.elasticSearchService }}:{{ int .Values.elasticSearchPort }}" ] - console.enabled: false server.basePath: "/apigatewayui/dashboardproxy" - kibana.index: "gateway_{{ .Values.global.integrationServerInstanceName }}_dashboard" diff --git a/samples/kubernetes/helm/peer-to-peer-cluster-deployment/apigateway/charts/elasticsearchkibana/values.yaml b/samples/kubernetes/helm/peer-to-peer-cluster-deployment/apigateway/charts/elasticsearchkibana/values.yaml index 52d9b6c..3048639 100644 --- a/samples/kubernetes/helm/peer-to-peer-cluster-deployment/apigateway/charts/elasticsearchkibana/values.yaml +++ b/samples/kubernetes/helm/peer-to-peer-cluster-deployment/apigateway/charts/elasticsearchkibana/values.yaml @@ -33,8 +33,8 @@ kibanaConfigmap: "kibana-config" elasticImage: "docker.elastic.co/elasticsearch/elasticsearch" kibanaImage: "docker.elastic.co/kibana/kibana" -elasticTag: "7.13.0" -kibanaTag: "7.13.0" +elasticTag: "8.3.2" +kibanaTag: "8.3.2" clusterSize: 3 diff --git a/samples/kubernetes/helm/peer-to-peer-cluster-deployment/apigateway/values.yaml b/samples/kubernetes/helm/peer-to-peer-cluster-deployment/apigateway/values.yaml index f0c02ef..3bdc8e7 100644 --- a/samples/kubernetes/helm/peer-to-peer-cluster-deployment/apigateway/values.yaml +++ b/samples/kubernetes/helm/peer-to-peer-cluster-deployment/apigateway/values.yaml @@ -26,8 +26,8 @@ global: apigwClusterSize: 1 -apigwImage: "store/softwareag/apigateway-trial" -apigwTag: "10.11" +apigwImage: "sagcr.azurecr.io/apigateway" +apigwTag: "11.0" apigwUiService: "apigw-ui-svc" apigwRtService: "apigw-rt-svc" diff --git a/samples/kubernetes/helm/simple-deployment/README.md b/samples/kubernetes/helm/single-node-deployment/README.md similarity index 100% rename from samples/kubernetes/helm/simple-deployment/README.md rename to samples/kubernetes/helm/single-node-deployment/README.md diff --git a/samples/kubernetes/helm/simple-deployment/sag-apigateway/Chart.yaml b/samples/kubernetes/helm/single-node-deployment/sag-apigateway/Chart.yaml similarity index 100% rename from samples/kubernetes/helm/simple-deployment/sag-apigateway/Chart.yaml rename to samples/kubernetes/helm/single-node-deployment/sag-apigateway/Chart.yaml diff --git a/samples/kubernetes/helm/simple-deployment/sag-apigateway/README.md b/samples/kubernetes/helm/single-node-deployment/sag-apigateway/README.md similarity index 100% rename from samples/kubernetes/helm/simple-deployment/sag-apigateway/README.md rename to samples/kubernetes/helm/single-node-deployment/sag-apigateway/README.md diff --git a/samples/kubernetes/helm/simple-deployment/sag-apigateway/templates/_helpers.tpl b/samples/kubernetes/helm/single-node-deployment/sag-apigateway/templates/_helpers.tpl similarity index 100% rename from samples/kubernetes/helm/simple-deployment/sag-apigateway/templates/_helpers.tpl rename to samples/kubernetes/helm/single-node-deployment/sag-apigateway/templates/_helpers.tpl diff --git a/samples/kubernetes/helm/simple-deployment/sag-apigateway/templates/deployment.yaml b/samples/kubernetes/helm/single-node-deployment/sag-apigateway/templates/deployment.yaml similarity index 88% rename from samples/kubernetes/helm/simple-deployment/sag-apigateway/templates/deployment.yaml rename to samples/kubernetes/helm/single-node-deployment/sag-apigateway/templates/deployment.yaml index 5379c26..edf8847 100644 --- a/samples/kubernetes/helm/simple-deployment/sag-apigateway/templates/deployment.yaml +++ b/samples/kubernetes/helm/single-node-deployment/sag-apigateway/templates/deployment.yaml @@ -20,6 +20,15 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} + initContainers: + - command: + - sh + - -c + - sysctl -w vm.max_map_count=262144 + name: sysctl + image: busybox:1.28 + securityContext: + privileged: true containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" @@ -27,7 +36,7 @@ spec: env: {{ if .Values.elasticsearch_external }} - name: "apigw_elasticsearch_hosts" - value: "{{ .Values.elasticsearch_external.host }}" + value: "{{ .Values.elasticsearch_external.host }}:{{ .Values.elasticsearch_external.port }}" - name: "apigw_elasticsearch_https_enabled" value: "{{ .Values.elasticsearch_external.https }}" - name: "apigw_elasticsearch_http_username" @@ -57,26 +66,26 @@ spec: - containerPort: {{ .Values.apigateway.port }} name: "{{ .Values.apigateway.port }}tcp" protocol: TCP - {{ if and (not .Values.elasticsearch_external) (not .Values.elasticsearch_sidecar) }} + {{ if .Values.elasticsearch_embedded }} - containerPort: {{ .Values.elasticsearch_embedded.port }} name: "{{ .Values.elasticsearch_embedded.port }}tcp" protocol: TCP {{ end }} livenessProbe: - failureThreshold: 4 - initialDelaySeconds: 30 + failureThreshold: 10 + initialDelaySeconds: 60 periodSeconds: 10 successThreshold: 1 tcpSocket: port: {{ .Values.is.port }} timeoutSeconds: 2 readinessProbe: - failureThreshold: 3 + failureThreshold: 12 httpGet: path: /rest/apigateway/health port: {{ .Values.is.port }} scheme: HTTP - initialDelaySeconds: 60 + initialDelaySeconds: 90 periodSeconds: 10 successThreshold: 2 timeoutSeconds: 2 @@ -98,7 +107,7 @@ spec: name: "9200tcp" protocol: TCP livenessProbe: - failureThreshold: 3 + failureThreshold: 20 initialDelaySeconds: 10 periodSeconds: 2 successThreshold: 1 @@ -106,7 +115,7 @@ spec: port: 9200 timeoutSeconds: 2 readinessProbe: - failureThreshold: 3 + failureThreshold: 20 initialDelaySeconds: 10 periodSeconds: 2 successThreshold: 2 @@ -127,4 +136,4 @@ spec: {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} \ No newline at end of file diff --git a/samples/kubernetes/helm/simple-deployment/sag-apigateway/templates/service.yaml b/samples/kubernetes/helm/single-node-deployment/sag-apigateway/templates/service.yaml similarity index 88% rename from samples/kubernetes/helm/simple-deployment/sag-apigateway/templates/service.yaml rename to samples/kubernetes/helm/single-node-deployment/sag-apigateway/templates/service.yaml index 1f0be84..a8b78ce 100644 --- a/samples/kubernetes/helm/simple-deployment/sag-apigateway/templates/service.yaml +++ b/samples/kubernetes/helm/single-node-deployment/sag-apigateway/templates/service.yaml @@ -22,12 +22,14 @@ spec: targetPort: 9200 protocol: TCP {{else }} + {{ if .Values.elasticsearch_embedded }} - name: http3 port: {{ .Values.elasticsearch_embedded.port}} targetPort: {{ .Values.elasticsearch_embedded.port}} protocol: TCP {{end}} {{end}} + {{end}} selector: app.kubernetes.io/name: {{ include "apigateway.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} \ No newline at end of file + app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/samples/kubernetes/helm/simple-deployment/sag-apigateway/values.yaml b/samples/kubernetes/helm/single-node-deployment/sag-apigateway/values.yaml similarity index 86% rename from samples/kubernetes/helm/simple-deployment/sag-apigateway/values.yaml rename to samples/kubernetes/helm/single-node-deployment/sag-apigateway/values.yaml index 2124ffb..71cca2e 100644 --- a/samples/kubernetes/helm/simple-deployment/sag-apigateway/values.yaml +++ b/samples/kubernetes/helm/single-node-deployment/sag-apigateway/values.yaml @@ -6,8 +6,8 @@ replicaCount: 1 image: # Use the url pointing to your repository. - repository: :/ - tag: + repository: "sagcr.azurecr.io/apigateway" + tag: "11.0" # The default pull policy is IfNotPresent which causes the Kubelet to skip pulling an image if it already exists. # If you would like to always force a pull use "Always" pullPolicy: IfNotPresent @@ -35,19 +35,22 @@ apigateway: # Use true if your elasticsearch has https enabled, false if not. # Fill in your elasticsearch username for example: elastic # Fill in your elasticsearch password for example: changeme + #Elasticsearch_external: -# host: ":" -# https: <"false" or "true"> -# username: -# password: +# host: "elasticsearch-svc" +# port: 9200 +# https: "false" +# username: +# password: -# Docker image for elasticsearch. Default is: docker.elastic.co/elasticsearch/elasticsearch:5.6.4 +# Docker image for elasticsearch. Default is: docker.elastic.co/elasticsearch/elasticsearch:8.2.3 elasticsearch_sidecar: image: docker.elastic.co/elasticsearch/elasticsearch - tag: 7.2.0 + tag: 8.2.3 # Port of the embedded elasticsearch used inside off the container. Default is: 9240 #elasticsearch_embedded: +# use: false # port: 9240 # If a terracotta_host is set, the api gateway(s) will try to connect them to the terracotta host and cluster them.