├── .github └── workflows │ └── main.yml ├── .gitignore ├── QUICKSTART.md ├── README.md ├── charts ├── odd-collector │ ├── .helmignore │ ├── Chart.yaml │ ├── README.md │ ├── templates │ │ ├── _helpers.tpl │ │ ├── configmap.yaml │ │ ├── deployment.yaml │ │ ├── hpa.yaml │ │ └── secret.yaml │ └── values.yaml ├── odd-platform │ ├── .helmignore │ ├── Chart.yaml │ ├── README.md │ ├── templates │ │ ├── _helpers.tpl │ │ ├── configmap.yaml │ │ ├── deployment.yaml │ │ ├── hpa.yaml │ │ ├── ingress.yaml │ │ ├── service.yaml │ │ └── serviceaccount.yaml │ └── values.yaml ├── odd-quicklaunch │ ├── Chart.yaml │ ├── README.md │ ├── charts │ │ └── odd-platform │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── README.md │ │ │ ├── templates │ │ │ ├── _helpers.tpl │ │ │ ├── configmap.yaml │ │ │ ├── deployment.yaml │ │ │ ├── hpa.yaml │ │ │ ├── ingress.yaml │ │ │ ├── service.yaml │ │ │ └── serviceaccount.yaml │ │ │ └── values.yaml │ └── values.yaml └── odd-tracing-gateway │ ├── Chart.yaml │ ├── README.md │ ├── templates │ ├── _helpers.tpl │ ├── clusterrole.yaml │ ├── deployment.yaml │ ├── rolebinding.yaml │ ├── service.yaml │ └── serviceaccount.yaml │ └── values.yaml └── cloudformation ├── collector-values.yaml └── odd_cloudformation.yaml /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | workflow_dispatch: 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v2.3.4 16 | with: 17 | fetch-depth: 0 18 | token: "${{ secrets.GITHUB_TOKEN }}" 19 | - name: Configure Git 20 | run: | 21 | git config user.name "$GITHUB_ACTOR" 22 | git config user.email "$GITHUB_ACTOR@users.noreply.github.com" 23 | - name: Install Helm 24 | uses: azure/setup-helm@v1 25 | with: 26 | version: v3.9.3 27 | - name: Setup Kubeval 28 | uses: lra/setup-kubeval@v1.0.1 29 | - name: Bump Helm Chart Version 30 | run: | 31 | #!/bin/bash 32 | python3 -m pip install pybump 33 | charts=$(ls -d charts/*/ | awk -F/ '{print $2}') 34 | K8S_VERSIONS=$(git ls-remote --refs --tags https://github.com/kubernetes/kubernetes.git | cut -d/ -f3 | grep -e '^v1\.[0-9]\{2\}\.[0]\{1,2\}$' | grep -v -e '^v1\.1[0-7]\{1\}' | cut -c2-) 35 | for chart in $charts; 36 | do 37 | chart_ver=$(yq '.version' charts/$chart/Chart.yaml); 38 | chart_changes="$(git diff --name-only HEAD $chart-$chart_ver -- charts/$chart)"; 39 | if [ ! -z "$chart_changes" ]; 40 | then 41 | for version in $K8S_VERSIONS 42 | do 43 | echo $version; 44 | helm template --kube-version $version --set ingress.enabled=true charts/$chart -f charts/$chart/values.yaml | kubeval --additional-schema-locations https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master --strict -v $version; 45 | done 46 | pybump bump --file charts/$chart/Chart.yaml --level patch --quiet 47 | new_version=$(yq '.version' charts/$chart/Chart.yaml ) 48 | echo $chart-$new_version 49 | git add charts/$chart/Chart.yaml 50 | git commit -m "Bump $chart version $new_version" 51 | if [[ "${{ github.event_name }}" == "push" ]]; then 52 | git push 53 | fi 54 | fi 55 | done 56 | - name: Helm Chart Releaser 57 | if: ${{ github.event_name == 'push' && github.ref_name == 'main' }} 58 | uses: helm/chart-releaser-action@v1.2.1 59 | env: 60 | CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" 61 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Example user template template 2 | ### Example user template 3 | 4 | # IntelliJ project files 5 | .idea 6 | *.iml 7 | out 8 | gen 9 | .envrc 10 | local-tests/** -------------------------------------------------------------------------------- /QUICKSTART.md: -------------------------------------------------------------------------------- 1 | # Quick Launch of Open Data Discovery platform and collector on Amazon Elastic Kubernetes Service (EKS) 2 | 3 | *** 4 | 5 | ## What will be deployed 6 | 7 | This is the new way for data teams to discover, understand, trust, and collaborate on data assets. ODD serves as a tool to put Data Governance strategies into practice and this guide will show you an easy way to get Open Data Discovery up and running on Amazon EKS. 8 | 9 | New environment will consists of: 10 | 11 | * ODD Platform – an application that collects, structures, indexes and provides a metadata via REST API and UI 12 | * PostgreSQL database that is used by ODD Platform as a persistence storage 13 | * ODD Collector with configured PostgreSQL adapter that grabs metadata from the ODD Platform's database 14 | 15 | ## Prerequisites 16 | 17 | * Before you start, ensure that you have an **AWS account** and if not, then you have to create one. 18 | 19 | ## Overview of the Quick Launch 20 | 21 | * Provision an EKS Cluster 22 | * Install and deploy PosgreSQL 23 | * Deploy and run Open data Discovery (ODD) 24 | * Configure deploy and run Collector 25 | 26 | ## Start an EKS Cluster 27 | 28 | * **Step 1**. Click on [Quick lunch](https://us-east-2.console.aws.amazon.com/cloudformation/home?region=eu-central-1#/stacks/create/review?templateURL=https://odd-ct-templates.s3.us-east-2.amazonaws.com/odd\_cloudformation.yaml\&stackName=ODD-EKS) and you’ll be redirected to Cloud Formation Stack on AWS the account where you are logged in. Please, check that you are in one of the supported regions: us-west-2, us-west-1, us-east-2, us-east-1. 29 | * **Step 2**. You’ll be directed through several setup stages, including following ones: 30 | * **Cluster Setup** 31 | * Cluster Name: Supply a unique and descriptive name for your EKS cluster, like “MyEKS-Cluster”. The default name is pre-set as: ODD-EKS. 32 | * **Node Group** 33 | * Instance Types: Choose EC2 Instance types for your worker nodes. The default type is pre-set as: t3.large. 34 | * Desired Capacity: Indicate the quantity of worker nodes you want in the node group, The default is configured as 1. 35 | * SSH Key Pair: Opt for an existing or create a new one for secure worker node access. 36 | * **Role** 37 | * Provide an existing role with sufficient privileges or create and assign a new one. 38 | * **Step 3**.Check all your configurations to confirm their correctness. 39 | * **Step 4**.Click “Create Stack” to confirm the EKS cluster creation process. 40 | 41 | ## Access and Manage your EKS Cluster 42 | 43 | ### Authentication with AWS EKS 44 | 45 | To begin, authenticate kubectl with your EKS cluster. AWS offers a convenient command: 46 | 47 | `aws eks --region update-kubeconfig --name ` 48 | 49 | Replace with the AWS region where your EKS cluster is deployed and with the name of your EKS cluster to have a command similar to following: 50 | 51 | `aws eks --region us-east-1 update-kubeconfig --name ODD-EKS` 52 | 53 | At the current state only following regions are available: 54 | 55 | * **us-west-2** 56 | * **us-west-1** 57 | * **us-east-2** 58 | * **us-east-1** 59 | 60 | ### Verification and Configuration 61 | 62 | Confirm that your kubectl configuration is correctly set by listing the available nodes in your cluster: 63 | 64 | `kubectl get nodes` 65 | 66 | ## Install Helm for your EKS Cluster 67 | 68 | ### Obtain the Helm binary 69 | 70 | Visit the Helm [Github releases page](https://github.com/helm/helm/releases) and download the suitable Helm binary. You can use the following command: 71 | 72 | `sudo yum install -y openssl && curl -sSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash` 73 | 74 | To ensure a successful installation, use the command: 75 | 76 | `helm version --short` 77 | 78 | ### Add a Helm Chart Repository 79 | 80 | Add a repository to access pre-built charts: 81 | 82 | `helm repo add bitnami https://charts.bitnami.com/bitnami` 83 | 84 | ## Install PosgreSQL using Helm 85 | 86 | Install PosgreSQL with the command: 87 | 88 | `helm install postgresql bitnami/postgresql --set primary.persistence.enabled=false --set global.postgresql.auth.database=odd-platform` 89 | 90 | This basic deployment can be tailored by adjusting values in the Helm chart to meet your specific requirements. 91 | 92 | To check the status of your deployment after the installation is done, use: 93 | 94 | `kubectl get pods` 95 | 96 | Upon the successful installation of PosgreSQL, an auto-generated password becomes available.It’s a good practice to store this password as an environment variable and use it when working with the ODD platform. 97 | 98 | To do that, execute the following command: 99 | 100 | `export POSTGRES_PASSWORD=$(kubectl get secret --namespace default postgresql -o jsonpath="{.data.postgres-password}" | base64 -d)` 101 | 102 | ## Deploy Open data Discovery (ODD) 103 | 104 | To deploy ODD platform, first you need to add a repository: 105 | 106 | `helm repo add opendatadiscovery https://opendatadiscovery.github.io/charts` 107 | 108 | ### Install the platform. 109 | 110 | `helm install odd-platform opendatadiscovery/odd-platform --set config.yaml.spring.datasource.username=postgres --set config.yaml.spring.datasource.password="$POSTGRES_PASSWORD" --set config.yaml.spring.datasource.url="jdbc:postgresql://postgresql:5432/odd-platform" --set service.type=LoadBalancer --set service.annotations."service\.beta\.kubernetes\.io/load-balancer-source-ranges"="/32"` 111 | 112 | To find your IP address follow these instructions. 113 | 114 | * For Windows OS, you can search for “What is my IP” in your preferred search engine. 115 | * For MacOS and Linux, use the command `wget -qO- ipecho.net/plain` And your public IP address will be displayed in the terminal output. Also, if you are behind a router firewall, the IP address you retrieve will be the public IP assigned to your router by your ISP. 116 | 117 | For example, 118 | 119 | `helm install odd-platform opendatadiscovery/odd-platform --set config.yaml.spring.datasource.username=postgres --set config.yaml.spring.datasource.password="$POSTGRES_PASSWORD" --set config.yaml.spring.datasource.url="jdbc:postgresql://postgresql:5432/odd-platform" --set service.type=LoadBalancer --set service.annotations."service\.beta\.kubernetes\.io/load-balancer-source-ranges"="83.3.12.58/32"` 120 | 121 | If you wish to enable connectivity with multiple IPs, you’ll need to execute the following set of commands instead: 122 | 123 | `helm upgrade odd-platform opendatadiscovery/odd-platform --set config.yaml.spring.datasource.username=postgres --set config.yaml.spring.datasource.password=" $POSTGRES_PASSWORD" --set config.yaml.spring.datasource.url="jdbc:postgresql://postgresql:5432/odd-platform" --set service.type=LoadBalancer --set service.annotations."service\.beta\.kubernetes\.io/load-balancer-source-ranges"="/32\,/32"` 124 | 125 | Do not forget to replace the strings and in this command with your IP addresses separated with commas and written in double quotation marks. 126 | 127 | ### How to be sure everything is Up and Running? 128 | 129 | There is a common command for this action: 130 | 131 | `kubectl get pods` 132 | 133 | `kubectl get svc` 134 | 135 | After completing the setup and ensuring everything is up and running, you can start using the ODD platform through your web browser. To do this, obtain the hostname of your Load Balancer and use it to establish a connection to your EKS. 136 | 137 | `kubectl get svc odd-platform -o=custom-columns=EXTERNAL-IP:.status.loadBalancer.ingress[0].hostname | tail -n 1` 138 | 139 | If the setup is successful, you will be able to access the platform demo page directly from your web browser. 140 | 141 | _With the versions of the platform >= 0.18.0 you could get acquainted with the API of the platform by simply visiting_ [_Swagger UI_](../../api/v3/webjars/swagger-ui/index.html)_. For example, if for Load Balancer host `a1e67ff8befc54b75969f9834a6e329a-948212351` we could visit `http://a1e67ff8befc54b75969f9834a6e329a-948212351.us-east-1.elb.amazonaws.com/api/v3/webjars/swagger-ui/index.html`._ 142 | 143 | ## Important Note! 144 | 145 | In this setup there are no certificates created to use encrypted communication. Be aware that only http protocol is supported in this setup. For example, `http://a1e67ff8befc54b75969f9834a6e329a-948212351.us-east-1.elb.amazonaws.com/` This protocol is not secure, please, do not send any sensitive information via this connection! Demonstration purpose only! For production cases please configure HTTPS Protocol. 146 | 147 | ## How to delete Cloudformation Stack? 148 | 149 | Deletion starts with uninstalling the platform 150 | 151 | `helm uninstall odd-platform` 152 | 153 | To avoid incurring additional charges or when you’re confident that you no longer require your current resources any longer you can [delete your Cloudformation Stack](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-console-delete-stack.html). 154 | 155 | ## ODD Collector Configuration for AWS EKS 156 | 157 | Setting up the Collector involves several steps. 158 | 159 | * Create a **Namespace** and proceed to initiate the addition of **a new collector**. Chose a namespace from the drop-down list of available options, optionally include a description and save the settings. 160 | * Make sure to securely copy and store the **token** generated by the platform for future use and if not, then the token will need to be regenerated for your next session. 161 | * Now, it is time to proceed with adding the ODD repository and configuring the collector files. This can be accomplished by executing the following commands in the specified order. 162 | 163 | `helm repo add opendatadiscovery https://opendatadiscovery.github.io/charts` 164 | 165 | `wget https://raw.githubusercontent.com/opendatadiscovery/charts/main/cloudformation/collector-values.yaml` 166 | 167 | **Note:** you need to replace the **Generated token** part in following command with the token you have copied earlier and run it. 168 | 169 | `sed -i 's/odd-token//g' collector-values.yaml` 170 | 171 | `export POSTGRES_PASSWORD=$(kubectl get secret --namespace default postgresql -o jsonpath="{.data.postgres-password}" | base64 -d) helm install odd-collector opendatadiscovery/odd-collector --set nameOverride=odd-collector --set passwordSecretsEnvs.POSTGRES_PASSWORD=$POSTGRES_PASSWORD -f collector-values.yaml` 172 | 173 | If you’ve followed the instructions correctly, you should see in outcome in your Cloudshell informing you that ODD Collector is up and running. 174 | 175 | Furthermore, we’ve made it available for you to include additional plugins if desired. 176 | 177 | To do that, manually update the `collector-values.yaml` file with your chosen text editor and then run the following command in the CloudShell: 178 | 179 | `helm upgrade --install odd-collector opendatadiscovery/odd-collector --set nameOverride=odd-collector --set passwordSecretsEnvs.POSTGRES_PASSWORD=$POSTGRES_PASSWORD -f collector-values.yaml` 180 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenDataDiscovery Helm charts 2 | 3 | ## Usage 4 | 5 | [Helm](https://helm.sh) must be installed to use the charts. Please refer to 6 | Helm's [documentation](https://helm.sh/docs) to get started. 7 | 8 | Once Helm has been set up correctly, add the repo as follows: 9 | 10 | ``` bash 11 | helm repo add opendatadiscovery https://opendatadiscovery.github.io/charts 12 | ``` 13 | 14 | If you had already added this repo earlier, run `helm repo update` to retrieve 15 | the latest versions of the packages. You can then run `helm search repo 16 | opendatadiscovery` to see the charts. 17 | 18 | To install the chart: 19 | 20 | ``` bash 21 | helm install my- opendatadiscovery/ 22 | ``` 23 | 24 | To uninstall the chart: 25 | 26 | ``` bash 27 | helm delete my- 28 | ``` 29 | 30 | ## Example 31 | 32 | We use odd-collector as our main service to gathers metadata from all of yours data sources, for example, to install [odd-collector](https://github.com/opendatadiscovery/odd-collector): 33 | 34 | ``` bash 35 | helm install odd-collector opendatadiscovery/odd-collector --set nameOverride=odd-collector --set image.repository=ghcr.io/opendatadiscovery/odd-collector 36 | ``` 37 | -------------------------------------------------------------------------------- /charts/odd-collector/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/odd-collector/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: latest 3 | description: A Helm chart for any odd-collector compatible deployments 4 | name: odd-collector 5 | type: application 6 | version: 0.1.10 7 | -------------------------------------------------------------------------------- /charts/odd-collector/README.md: -------------------------------------------------------------------------------- 1 | # odd-collector 2 | 3 | ![Version: 0.1.4](https://img.shields.io/badge/Version-0.1.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) 4 | 5 | A Helm chart for any odd-collector compatible deployments 6 | 7 | ## Values 8 | 9 | | Key | Type | Default | Description | 10 | |-----|------|---------|-------------| 11 | | affinity | object | `{}` | | 12 | | autoscaling.enabled | bool | `false` | | 13 | | autoscaling.maxReplicas | int | `100` | | 14 | | autoscaling.minReplicas | int | `1` | | 15 | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | 16 | | collectorConfig | string | `"default_pulling_interval: 10\ntoken: \"\"\nplatform_host_url: \"http://odd\"\nplugins:\n - type: postgresql\n name: test_postgresql_collector\n host: \"localhost\"\n port: 5432\n database: \"some_database_name\"\n user: \"some_user_name\"\n password: !ENV ${POSTGRES_PASSWORD}\n - type: mysql\n name: test_mysql_collector\n host: \"localhost\"\n port: 3306\n database: \"some_database_name\"\n user: \"some_user_name\"\n password: \"some_password\"\n"` | | 17 | | env | list | `[]` | | 18 | | existingSecretsForEnv | string | `""` | | 19 | | fullnameOverride | string | `""` | | 20 | | image.pullPolicy | string | `"IfNotPresent"` | | 21 | | image.repository | string | `"ghcr.io/opendatadiscovery/odd-collector"` | | 22 | | image.tag | string | `""` | | 23 | | imagePullSecrets | list | `[]` | | 24 | | nameOverride | string | `""` | | 25 | | nodeSelector | object | `{}` | | 26 | | passwordSecretsEnvs | object | `{}` | | 27 | | podAnnotations | object | `{}` | | 28 | | podSecurityContext | object | `{}` | | 29 | | replicaCount | int | `1` | | 30 | | resources | object | `{}` | | 31 | | securityContext | object | `{}` | | 32 | | tolerations | list | `[]` | | 33 | 34 | ---------------------------------------------- 35 | Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) 36 | -------------------------------------------------------------------------------- /charts/odd-collector/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "odd-collector.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 7 | {{- end }} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "odd-collector.fullname" -}} 15 | {{- if .Values.fullnameOverride }} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 17 | {{- else }} 18 | {{- $name := default .Chart.Name .Values.nameOverride }} 19 | {{- if contains $name .Release.Name }} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 21 | {{- else }} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 23 | {{- end }} 24 | {{- end }} 25 | {{- end }} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "odd-collector.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 32 | {{- end }} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "odd-collector.labels" -}} 38 | helm.sh/chart: {{ include "odd-collector.chart" . }} 39 | {{ include "odd-collector.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- end }} 45 | 46 | {{/* 47 | Selector labels 48 | */}} 49 | {{- define "odd-collector.selectorLabels" -}} 50 | app.kubernetes.io/name: {{ include "odd-collector.name" . }} 51 | app.kubernetes.io/instance: {{ .Release.Name }} 52 | {{- end }} 53 | -------------------------------------------------------------------------------- /charts/odd-collector/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ include "odd-collector.fullname" . }} 5 | labels: 6 | {{- include "odd-collector.labels" . | nindent 4 }} 7 | data: 8 | config.yaml: {{ .Values.collectorConfig | quote }} 9 | -------------------------------------------------------------------------------- /charts/odd-collector/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "odd-collector.fullname" . }} 5 | labels: 6 | {{- include "odd-collector.labels" . | nindent 4 }} 7 | spec: 8 | {{- if not .Values.autoscaling.enabled }} 9 | replicas: {{ .Values.replicaCount }} 10 | {{- end }} 11 | selector: 12 | matchLabels: 13 | {{- include "odd-collector.selectorLabels" . | nindent 6 }} 14 | template: 15 | metadata: 16 | {{- with .Values.podAnnotations }} 17 | annotations: 18 | {{- toYaml . | nindent 8 }} 19 | {{- end }} 20 | labels: 21 | {{- include "odd-collector.selectorLabels" . | nindent 8 }} 22 | spec: 23 | {{- with .Values.imagePullSecrets }} 24 | imagePullSecrets: 25 | {{- toYaml . | nindent 8 }} 26 | {{- end }} 27 | securityContext: 28 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 29 | containers: 30 | - name: {{ .Chart.Name }} 31 | securityContext: 32 | {{- toYaml .Values.securityContext | nindent 12 }} 33 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 34 | imagePullPolicy: {{ .Values.image.pullPolicy }} 35 | envFrom: 36 | - secretRef: 37 | name: {{ include "odd-collector.fullname" . }} 38 | optional: true 39 | {{- with .Values.existingSecretsForEnv }} 40 | - secretRef: 41 | name: {{ . }} 42 | {{- end }} 43 | {{- with .Values.env }} 44 | env: 45 | {{- toYaml . | nindent 12 }} 46 | {{- end }} 47 | {{- with .Values.resources }} 48 | resources: 49 | {{- toYaml . | nindent 12 }} 50 | {{- end }} 51 | volumeMounts: 52 | - name: config-volume 53 | mountPath: /app/collector_config.yaml 54 | subPath: config.yaml 55 | volumes: 56 | - name: config-volume 57 | configMap: 58 | name: {{ include "odd-collector.fullname" . }} 59 | {{- with .Values.nodeSelector }} 60 | nodeSelector: 61 | {{- toYaml . | nindent 8 }} 62 | {{- end }} 63 | {{- with .Values.affinity }} 64 | affinity: 65 | {{- toYaml . | nindent 8 }} 66 | {{- end }} 67 | {{- with .Values.tolerations }} 68 | tolerations: 69 | {{- toYaml . | nindent 8 }} 70 | {{- end }} 71 | -------------------------------------------------------------------------------- /charts/odd-collector/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "odd-collector.fullname" . }} 6 | labels: 7 | {{- include "odd-collector.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "odd-collector.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 21 | {{- end }} 22 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 23 | - type: Resource 24 | resource: 25 | name: memory 26 | targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 27 | {{- end }} 28 | {{- end }} 29 | -------------------------------------------------------------------------------- /charts/odd-collector/templates/secret.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: {{ include "odd-collector.fullname" . }} 5 | labels: 6 | {{- include "odd-collector.labels" . | nindent 4 }} 7 | data: 8 | {{- range $k, $v := .Values.passwordSecretsEnvs }} 9 | {{ $k | quote }}: {{ $v | toString | b64enc | quote }} 10 | {{- end }} -------------------------------------------------------------------------------- /charts/odd-collector/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for odd-collector. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ghcr.io/opendatadiscovery/odd-collector 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | podAnnotations: {} 18 | 19 | podSecurityContext: 20 | {} 21 | # fsGroup: 2000 22 | 23 | securityContext: 24 | {} 25 | # capabilities: 26 | # drop: 27 | # - ALL 28 | # readOnlyRootFilesystem: true 29 | # runAsNonRoot: true 30 | # runAsUser: 1000 31 | env: [] 32 | 33 | existingSecretsForEnv: "" 34 | passwordSecretsEnvs: 35 | {} 36 | # POSTGRES_PASSWORD: "overridebyhelmsetvalue" 37 | 38 | resources: 39 | {} 40 | # We usually recommend not to specify default resources and to leave this as a conscious 41 | # choice for the user. This also increases chances charts run on environments with little 42 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 43 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 44 | # limits: 45 | # cpu: 100m 46 | # memory: 128Mi 47 | # requests: 48 | # cpu: 100m 49 | # memory: 128Mi 50 | 51 | autoscaling: 52 | enabled: false 53 | minReplicas: 1 54 | maxReplicas: 100 55 | targetCPUUtilizationPercentage: 80 56 | # targetMemoryUtilizationPercentage: 80 57 | 58 | nodeSelector: {} 59 | 60 | tolerations: [] 61 | 62 | affinity: {} 63 | 64 | collectorConfig: | 65 | default_pulling_interval: 10 66 | token: "" 67 | platform_host_url: "http://odd" 68 | plugins: 69 | - type: postgresql 70 | name: test_postgresql_collector 71 | host: "localhost" 72 | port: 5432 73 | database: "some_database_name" 74 | user: "some_user_name" 75 | password: !ENV ${POSTGRES_PASSWORD} 76 | # - type: mysql 77 | # name: test_mysql_collector 78 | # host: "localhost" 79 | # port: 3306 80 | # database: "some_database_name" 81 | # user: "some_user_name" 82 | # password: "some_password" 83 | -------------------------------------------------------------------------------- /charts/odd-platform/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/odd-platform/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: odd-platform 3 | description: A Helm chart for Kubernetes 4 | 5 | # A chart can be either an 'application' or a 'library' chart. 6 | # 7 | # Application charts are a collection of templates that can be packaged into versioned archives 8 | # to be deployed. 9 | # 10 | # Library charts provide useful utilities or functions for the chart developer. They're included as 11 | # a dependency of application charts to inject those utilities and functions into the rendering 12 | # pipeline. Library charts do not define any templates and therefore cannot be deployed. 13 | type: application 14 | 15 | # This is the chart version. This version number should be incremented each time you make changes 16 | # to the chart and its templates, including the app version. 17 | # Versions are expected to follow Semantic Versioning (https://semver.org/) 18 | version: 0.1.10 19 | 20 | # This is the version number of the application being deployed. This version number should be 21 | # incremented each time you make changes to the application. Versions are not expected to 22 | # follow Semantic Versioning. They should reflect the version the application is using. 23 | appVersion: latest 24 | -------------------------------------------------------------------------------- /charts/odd-platform/README.md: -------------------------------------------------------------------------------- 1 | # odd-platform 2 | 3 | ![Version: 0.1.6](https://img.shields.io/badge/Version-0.1.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) 4 | 5 | A Helm chart for Kubernetes 6 | 7 | ## Values 8 | 9 | | Key | Type | Default | Description | 10 | |-----|------|---------|-------------| 11 | | affinity | object | `{}` | | 12 | | autoscaling.enabled | bool | `false` | | 13 | | autoscaling.maxReplicas | int | `100` | | 14 | | autoscaling.minReplicas | int | `1` | | 15 | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | 16 | | config | string | `nil` | | 17 | | fullnameOverride | string | `""` | | 18 | | image.pullPolicy | string | `"IfNotPresent"` | | 19 | | image.repository | string | `"ghcr.io/opendatadiscovery/odd-platform"` | | 20 | | image.tag | string | `""` | | 21 | | imagePullSecrets | list | `[]` | | 22 | | ingress.annotations | object | `{}` | | 23 | | ingress.className | string | `""` | | 24 | | ingress.enabled | bool | `false` | | 25 | | ingress.hosts[0].host | string | `"chart-example.local"` | | 26 | | ingress.hosts[0].paths | list | `[]` | | 27 | | ingress.tls | list | `[]` | | 28 | | nameOverride | string | `""` | | 29 | | nodeSelector | object | `{}` | | 30 | | podAnnotations | object | `{}` | | 31 | | podSecurityContext | object | `{}` | | 32 | | replicaCount | int | `1` | | 33 | | resources | object | `{}` | | 34 | | securityContext | object | `{}` | | 35 | | service.annotations | object | `{}` | | 36 | | service.port | int | `80` | | 37 | | service.type | string | `"ClusterIP"` | | 38 | | serviceAccount.annotations | object | `{}` | | 39 | | serviceAccount.create | bool | `true` | | 40 | | serviceAccount.name | string | `""` | | 41 | | tolerations | list | `[]` | | 42 | 43 | ---------------------------------------------- 44 | Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) 45 | -------------------------------------------------------------------------------- /charts/odd-platform/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "odd-platform.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 7 | {{- end }} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "odd-platform.fullname" -}} 15 | {{- if .Values.fullnameOverride }} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 17 | {{- else }} 18 | {{- $name := default .Chart.Name .Values.nameOverride }} 19 | {{- if contains $name .Release.Name }} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 21 | {{- else }} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 23 | {{- end }} 24 | {{- end }} 25 | {{- end }} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "odd-platform.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 32 | {{- end }} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "odd-platform.labels" -}} 38 | helm.sh/chart: {{ include "odd-platform.chart" . }} 39 | {{ include "odd-platform.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- end }} 45 | 46 | {{/* 47 | Selector labels 48 | */}} 49 | {{- define "odd-platform.selectorLabels" -}} 50 | app.kubernetes.io/name: {{ include "odd-platform.name" . }} 51 | app.kubernetes.io/instance: {{ .Release.Name }} 52 | {{- end }} 53 | 54 | {{/* 55 | Create the name of the service account to use 56 | */}} 57 | {{- define "odd-platform.serviceAccountName" -}} 58 | {{- if .Values.serviceAccount.create }} 59 | {{- default (include "odd-platform.fullname" .) .Values.serviceAccount.name }} 60 | {{- else }} 61 | {{- default "default" .Values.serviceAccount.name }} 62 | {{- end }} 63 | {{- end }} 64 | -------------------------------------------------------------------------------- /charts/odd-platform/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | {{- if (.Values.config).yaml -}} 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: {{ include "odd-platform.fullname" . }}-application-conf 6 | labels: 7 | {{- include "odd-platform.labels" . | nindent 4 }} 8 | data: 9 | application.yml: |- 10 | {{- toYaml .Values.config.yaml | nindent 4}} 11 | {{ end }} -------------------------------------------------------------------------------- /charts/odd-platform/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "odd-platform.fullname" . }} 5 | labels: 6 | {{- include "odd-platform.labels" . | nindent 4 }} 7 | spec: 8 | {{- if not .Values.autoscaling.enabled }} 9 | replicas: {{ .Values.replicaCount }} 10 | {{- end }} 11 | selector: 12 | matchLabels: 13 | {{- include "odd-platform.selectorLabels" . | nindent 6 }} 14 | template: 15 | metadata: 16 | {{- with .Values.podAnnotations }} 17 | annotations: 18 | {{- toYaml . | nindent 8 }} 19 | {{- end }} 20 | labels: 21 | {{- include "odd-platform.selectorLabels" . | nindent 8 }} 22 | spec: 23 | {{- with .Values.imagePullSecrets }} 24 | imagePullSecrets: 25 | {{- toYaml . | nindent 8 }} 26 | {{- end }} 27 | serviceAccountName: {{ include "odd-platform.serviceAccountName" . }} 28 | securityContext: 29 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 30 | containers: 31 | - name: {{ .Chart.Name }} 32 | securityContext: 33 | {{- toYaml .Values.securityContext | nindent 12 }} 34 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 35 | imagePullPolicy: {{ .Values.image.pullPolicy }} 36 | ports: 37 | - name: http 38 | containerPort: 8080 39 | protocol: TCP 40 | livenessProbe: 41 | tcpSocket: 42 | port: http 43 | readinessProbe: 44 | tcpSocket: 45 | port: http 46 | resources: 47 | {{- toYaml .Values.resources | nindent 12 }} 48 | {{- if or (.Values.config).env .Values.secret_keys }} 49 | env: 50 | {{- if or (.Values.config).env }} 51 | {{- toYaml .Values.config.env | nindent 12 }} 52 | {{- end }} 53 | {{- range .Values.secret_keys }} 54 | - name: {{ .}} 55 | valueFrom: 56 | secretKeyRef: 57 | name: demo-secret 58 | key: {{ . }} 59 | {{- end }} 60 | {{- end }} 61 | {{- if .Values.extra }} 62 | {{ toYaml .Values.extra | nindent 10 }} 63 | {{- end }} 64 | volumeMounts: 65 | {{- if (.Values.config).yaml }} 66 | - name: odd-platform-application-conf 67 | mountPath: /app/config/ 68 | {{- end }} 69 | volumes: 70 | {{- if (.Values.config).yaml }} 71 | - name: odd-platform-application-conf 72 | configMap: 73 | name: {{ include "odd-platform.fullname" . }}-application-conf 74 | {{- end }} 75 | {{- with .Values.nodeSelector }} 76 | nodeSelector: 77 | {{- toYaml . | nindent 8 }} 78 | {{- end }} 79 | {{- with .Values.affinity }} 80 | affinity: 81 | {{- toYaml . | nindent 8 }} 82 | {{- end }} 83 | {{- with .Values.tolerations }} 84 | tolerations: 85 | {{- toYaml . | nindent 8 }} 86 | {{- end }} 87 | -------------------------------------------------------------------------------- /charts/odd-platform/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "odd-platform.fullname" . }} 6 | labels: 7 | {{- include "odd-platform.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "odd-platform.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 21 | {{- end }} 22 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 23 | - type: Resource 24 | resource: 25 | name: memory 26 | targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 27 | {{- end }} 28 | {{- end }} 29 | -------------------------------------------------------------------------------- /charts/odd-platform/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled -}} 2 | {{- $fullName := include "odd-platform.fullname" . -}} 3 | {{- $svcPort := .Values.service.port -}} 4 | {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} 5 | {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} 6 | {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} 7 | {{- end }} 8 | {{- end }} 9 | {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} 10 | apiVersion: networking.k8s.io/v1 11 | {{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} 12 | apiVersion: networking.k8s.io/v1beta1 13 | {{- else -}} 14 | apiVersion: extensions/v1beta1 15 | {{- end }} 16 | kind: Ingress 17 | metadata: 18 | name: {{ $fullName }} 19 | labels: 20 | {{- include "odd-platform.labels" . | nindent 4 }} 21 | {{- with .Values.ingress.annotations }} 22 | annotations: 23 | {{- toYaml . | nindent 4 }} 24 | {{- end }} 25 | spec: 26 | ingressClassName: {{ .Values.ingress.className }} 27 | {{- if .Values.ingress.tls }} 28 | tls: 29 | {{- range .Values.ingress.tls }} 30 | - hosts: 31 | {{- range .hosts }} 32 | - {{ . | quote }} 33 | {{- end }} 34 | secretName: {{ .secretName }} 35 | {{- end }} 36 | {{- end }} 37 | rules: 38 | {{- range .Values.ingress.hosts }} 39 | - host: {{ .host | quote }} 40 | http: 41 | paths: 42 | {{- range .paths }} 43 | - path: {{ .path }} 44 | {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} 45 | pathType: {{ .pathType }} 46 | {{- end }} 47 | backend: 48 | {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} 49 | service: 50 | name: {{ $fullName }} 51 | port: 52 | number: {{ $svcPort }} 53 | {{- else }} 54 | serviceName: {{ $fullName }} 55 | servicePort: {{ $svcPort }} 56 | {{- end }} 57 | {{- end }} 58 | {{- end }} 59 | {{- end }} 60 | -------------------------------------------------------------------------------- /charts/odd-platform/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "odd-platform.fullname" . }} 5 | {{- with .Values.service.annotations }} 6 | annotations: 7 | {{- toYaml . | nindent 6 }} 8 | {{- end }} 9 | labels: 10 | {{- include "odd-platform.labels" . | nindent 4 }} 11 | spec: 12 | type: {{ .Values.service.type }} 13 | ports: 14 | - port: {{ .Values.service.port }} 15 | targetPort: http 16 | protocol: TCP 17 | name: http 18 | selector: 19 | {{- include "odd-platform.selectorLabels" . | nindent 4 }} 20 | -------------------------------------------------------------------------------- /charts/odd-platform/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "odd-platform.serviceAccountName" . }} 6 | labels: 7 | {{- include "odd-platform.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /charts/odd-platform/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for odd-platform. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ghcr.io/opendatadiscovery/odd-platform 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | serviceAccount: 18 | # Specifies whether a service account should be created 19 | create: true 20 | # Annotations to add to the service account 21 | annotations: {} 22 | # The name of the service account to use. 23 | # If not set and create is true, a name is generated using the fullname template 24 | name: "" 25 | 26 | podAnnotations: {} 27 | 28 | podSecurityContext: 29 | {} 30 | # fsGroup: 2000 31 | 32 | securityContext: 33 | {} 34 | # capabilities: 35 | # drop: 36 | # - ALL 37 | # readOnlyRootFilesystem: true 38 | # runAsNonRoot: true 39 | # runAsUser: 1000 40 | 41 | #secret_keys: 42 | # - SPRING_DATASOURCE_PASSWORD 43 | ##extra: 44 | ## envFrom: 45 | ## - configMapRef: 46 | ## name: config_map 47 | ## - secretRef: 48 | ## name: secret 49 | ## 50 | config: 51 | 52 | # env: 53 | # - name: AUTH_TYPE 54 | # value: OAUTH2 55 | # - name: MANAGEMENT_HEALTH_REDIS_ENABLED 56 | # value: "false" 57 | # - name: OTEL_INSTRUMENTATION_COMMON_DB_STATEMENT_SANITIZER_ENABLED 58 | # value: "false" 59 | # - name: SPRING_DATASOURCE_URL 60 | # value: jdbc:postgresql://hostname:5432/odc 61 | # - name: SPRING_DATASOURCE_USERNAME 62 | # value: dev 63 | # yaml: 64 | # spring: 65 | # datasource: 66 | # url: jdbc:postgresql://127.0.0.1:5432/odd-platform 67 | # username: odd-platform 68 | # password: odd-platform-password 69 | 70 | service: 71 | type: ClusterIP 72 | port: 80 73 | annotations: {} 74 | 75 | ingress: 76 | enabled: false 77 | className: "" 78 | annotations: 79 | {} 80 | # kubernetes.io/ingress.class: nginx 81 | # kubernetes.io/tls-acme: "true" 82 | hosts: 83 | - host: chart-example.local 84 | paths: 85 | - path: / 86 | pathType: ImplementationSpecific 87 | tls: [] 88 | # - secretName: chart-example-tls 89 | # hosts: 90 | # - chart-example.local 91 | 92 | resources: 93 | {} 94 | # We usually recommend not to specify default resources and to leave this as a conscious 95 | # choice for the user. This also increases chances charts run on environments with little 96 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 97 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 98 | # limits: 99 | # cpu: 100m 100 | # memory: 128Mi 101 | # requests: 102 | # cpu: 100m 103 | # memory: 128Mi 104 | 105 | autoscaling: 106 | enabled: false 107 | minReplicas: 1 108 | maxReplicas: 100 109 | targetCPUUtilizationPercentage: 80 110 | # targetMemoryUtilizationPercentage: 80 111 | 112 | nodeSelector: {} 113 | 114 | tolerations: [] 115 | 116 | affinity: {} 117 | -------------------------------------------------------------------------------- /charts/odd-quicklaunch/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: odd-quicklaunch 3 | description: A Helm chart for deploying odd-platform and its PostgreSQL database 4 | version: 1.2.2 5 | appVersion: latest 6 | 7 | dependencies: 8 | - name: postgresql 9 | version: 13.2.9 10 | repository: https://charts.bitnami.com/bitnami 11 | -------------------------------------------------------------------------------- /charts/odd-quicklaunch/README.md: -------------------------------------------------------------------------------- 1 | # Helm Chart for AWS Marketplace QuickLaunch 2 | 3 | For AWS Marketplace with product offering with Helm chart delivery method and support of QuickLaunch we need to prepare a parent helm chart that has to child charts: odd-platform and postgresql database for it. 4 | This approach would benefit from utilizing (QuickLaunch)[https://docs.aws.amazon.com/marketplace/latest/buyerguide/buyer-configuring-a-product.html#buyer-launch-container-quicklaunch]: first AWS Marketplace creates a new EKS cluster with its built-in CloudFormation for EKS and in the same stack it deploys mentioned Helm chart that should be stored at AWS ECR managed by AWS Marketplace that was created during new product registration. 5 | 6 | There are some differences to the base helm chart of odd-platform that should reflect new approach of AWS Marketplace QuickLaunch. 7 | 8 | 1. configmap.yaml template for odd-platform has been changed 9 | ``` 10 | ... 11 | data: 12 | application.yml: |- 13 | spring: 14 | datasource: 15 | username: "postgres" 16 | password: "{{ .Values.global.postgresql.auth.postgresPassword }}" 17 | url: "jdbc:postgresql://odd-quicklaunch-postgresql:5432/odd-platform" 18 | ... 19 | ``` 20 | That has been done to get value for password from value.yaml file of parent chart 21 | 22 | 2. service.yaml template for odd-platform has been changed 23 | 2.1. service.type: 24 | ``` 25 | ... 26 | spec: 27 | type: {{ .Values.global.platformServiceType }} 28 | ... 29 | ``` 30 | That has been done as AWS Marketplace QuickLaunch does not accept Override parameter key with '-' that we have in the name of chart. 31 | So we have to use another name. 32 | 33 | 2.2 annotations: 34 | ``` 35 | ... 36 | metadata: 37 | name: {{ include "odd-platform.fullname" . }} 38 | annotations: 39 | "service.beta.kubernetes.io/load-balancer-source-ranges": "{{ .Values.global.loadBalancerSourceRanges }}" 40 | ... 41 | ``` 42 | There is a restriction of 50 characters to be propagated with AWS Marketplace QuickLaunch Override parameter key. 43 | So we have to use new shorter one. 44 | 45 | 46 | # Steps to update version 47 | Change tags for odd-platform and chart version according to the actual state. In this example odd-platform version 0.19.0 and chart version 1.0.8 are used. 48 | ```commandline 49 | $ aws ecr get-login-password --region us-east-1 --profile ${AWSMarketplaceProfile} | docker login --username AWS --password-stdin 709825985650.dkr.ecr.us-east-1.amazonaws.com 50 | $ docker pull ghcr.io/opendatadiscovery/odd-platform:0.19.0 51 | $ docker tag ghcr.io/opendatadiscovery/odd-platform:0.19.0 709825985650.dkr.ecr.us-east-1.amazonaws.com/provectus/odd:0.19.0 52 | $ docker push 709825985650.dkr.ecr.us-east-1.amazonaws.com/provectus/odd:0.19.0 53 | $ # Update Helm chart version in Chart.yaml file that will be used in AWS Marketplace. This version is not correlated to odd-platfrom version but should be unique from each deployment 54 | $ helm dependency update . 55 | $ helm package . 56 | $ aws ecr get-login-password --region us-east-1 --profile ${AWSMarketplaceProfile} | helm registry login --username AWS --password-stdin 709825985650.dkr.ecr.us-east-1.amazonaws.com 57 | $ # In this example 1.0.8 has been set as Helm chart version in previous steps. Please, change Helm chart version to the actual one before pushing Helm chart to the AWS ECR 58 | $ export HELM_EXPERIMENTAL_OCI=1 && helm push ./odd-quicklaunch-1.0.8.tgz oci://709825985650.dkr.ecr.us-east-1.amazonaws.com/provectus/ 59 | ``` 60 | 61 | # Add new version in AWS Marketplace (Examples) 62 | 63 | ## Version Information 64 | 65 | | Property | Value | 66 | |-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------| 67 | | Version title | odd-platform 0.19.0 quicklaunch | 68 | | Release notes | Data Quality Dashboard with QuickLaunch capabilities (odd-patform and postgres in one helm chart) | 69 | 70 | ## Delivery option: Open Data Discovery Platform (Delivery method Container image) 71 | 72 | | Property | Value | 73 | |---------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------| 74 | | Container image | 709825985650.dkr.ecr.us-east-1.amazonaws.com/provectus/odd:0.19.0 | 75 | | Delivery option description | A simple installation of one instance of Open Data Discovery platform application. More info at https://github.com/opendatadiscovery/odd-platform/tree/main | 76 | | Usage instructions | (*) Usage instructions (see reference) | 77 | | Supported services | Amazon Elastic Container Service (ECS), Amazon Elastic Kubernetes Service (EKS), Amazon ECS Anywhere, Amazon EKS Anywhere / Self-managed Kubernetes | 78 | | Deployment templates - optional | Resource title: Helm Chart; Resource URL: https://github.com/opendatadiscovery/charts/tree/main/charts/odd-platform | 79 | 80 | 81 | (*) Usage instructions: 82 | ``` 83 | Running as a separate container. 84 | 85 | Setting up PostgreSQL connection details, for example, if you run PostgreSQL locally in as a docker container and provided login/password as postgres/mysecretpassword - change login/password to actual ones: 86 | ``` 87 | export POSTGRES_HOST=172.17.0.1 \ 88 | export POSTGRES_PORT=5432 \ 89 | export POSTGRES_DATABASE=postgres \ 90 | export POSTGRES_USER=postgres \ 91 | export POSTGRES_PASSWORD=mysecretpassword 92 | ``` 93 | Starting new instance of the platform: 94 | ``` 95 | docker run -d \ 96 | --name odd-platform \ 97 | -e SPRING_DATASOURCE_URL=jdbc:postgresql://${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE} \ 98 | -e SPRING_DATASOURCE_USERNAME=${POSTGRES_USER} \ 99 | -e SPRING_DATASOURCE_PASSWORD=${POSTGRES_PASSWORD} \ 100 | -p 8080:8080 \ 101 | 709825985650.dkr.ecr.us-east-1.amazonaws.com/provectus/odd:0.19.0 102 | ``` 103 | More info at https://github.com/opendatadiscovery/odd-platform 104 | ``` 105 | 106 | ## Delivery option: Open Data Discovery Platform Quick Launch (Delivery method Helm chart) 107 | 108 | | Property | Value | 109 | |-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------| 110 | | Helm chart | 709825985650.dkr.ecr.us-east-1.amazonaws.com/provectus/odd-quicklaunch:1.0.13 | 111 | | Container Image | 709825985650.dkr.ecr.us-east-1.amazonaws.com/provectus/odd:0.19.0 | 112 | | Delivery option description | This delivery method allows to deploy odd-platform and its database with one helm chart on newly created AWS EKS cluster with QuickLaunch | 113 | | Usage instructions | Utilizing QuickLaunch through CloudFormation enables a hassle-free setup of the Open Data Discovery platform. QuickLaunch streamlines the process by establishing a new EKS cluster and deploying a pre-set Helm chart that includes the odd-platform and a corresponding Postgresql database. You can explore the Chart's details and its AWS Marketplace inclusion at ODD Helm Chart GitHub - https://github.com/opendatadiscovery/charts/tree/main/charts/odd-quicklaunch. When setting up, choose a name of your liking for the stack and the EKS cluster (for example, you might use 'ODD-EKS' for both). Keep the 'Helm release name' as 'odd-quicklaunch'. For 'postgresPassword', select a secure password that will be used by the 'postgres' admin in the database and for connecting the odd-platform to the database. For 'AllowedIPAddresses', input a CIDR-formatted IP range or single IP (like 8.8.8.8/32) that will have access to the odd-platform. Determine your IP address at resources such as https://whatismyipaddress.com/. Remember, this IP might change with network reconfigurations, and you'll need to update access rules accordingly, as guided here: https://blog.opendatadiscovery.org/quick-launch-of-open-data-discovery-odd-platform-on-amazon-elastic-kubernetes-service-eks-5a0a4489e492. The entire setup process should take approximately 30-40 minutes. Once completed, navigate to the EKS section in the AWS Console. Locate your named EKS cluster, and under 'Resources', proceed to 'Service and networking', then 'Services'. Here, find and click on 'odd-quicklaunch-odd-platform'. The service page will display 'Load Balancer URLs', leading to your odd-platform. Note that accessing these URLs defaults to an HTTPS protocol, which QuickLaunch does not support. Ensure you access it via HTTP, like http://[your-load-balancer-URL]. Double check that if, for example, 'Load Balancer URLs' for the server looks like this 'ac3a9a5400b1d457dacba505325901cd-951018742.us-east-1.elb.amazonaws.com', the url in you browser would like this 'http://ac3a9a5400b1d457dacba505325901cd-951018742.us-east-1.elb.amazonaws.com'. Important Considerations: This setup only supports HTTP, not HTTPS, and is not secure for transmitting sensitive data. For production, consider enabling HTTPS. The database data is not persistent. A restart of the postgres pod will erase data, so for production use, consider a persistent postgresql setup. This setup excludes odd collectors and adapters, meaning no automatic data ingestion. To add these, refer to our blog post https://blog.opendatadiscovery.org/introducing-odd-collector-configuration-for-aws-eks-bcc2bf04ae7e. We are always happy to assist if you need any help! Just reach out to our community at ODD Community Slack https://go.opendatadiscovery.org/slack | 114 | | Supported services | Amazon Elastic Kubernetes Service (EKS) | 115 | | Helm release name | odd-quicklaunch | 116 | | QuickLaunch | Enable QuickLaunch | 117 | 118 | # Override parameters 119 | 120 | | Override parameter | Override parameter key | Override parameter default | CloudFormation parameter name | CloudFormation parameter description | Hide passwords and secrets | 121 | | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | 122 | | Override parameter 1 | global.platformServiceType | LoadBalancer | platformServiceType | Leave default LoadBalancer so that odd-platform has a public host | false | 123 | | Override parameter 2 | global.postgresql.auth.postgresPassword | | postgresPassword | Password for user postgres that is used to connect odd-platform to its database | true | 124 | | Override parameter 3 | global.loadBalancerSourceRanges | 1.1.1.1/32 | AllowedIPAddresses | List of CIDRs separated with comma that would have connection to odd-platform. For instance, it could be your IP address found at https://whatismyipaddress.com/.Format for single IP: x.x.x.x/32 | false | 125 | -------------------------------------------------------------------------------- /charts/odd-quicklaunch/charts/odd-platform/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/odd-quicklaunch/charts/odd-platform/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: odd-platform 3 | description: A Helm chart for Kubernetes 4 | 5 | # A chart can be either an 'application' or a 'library' chart. 6 | # 7 | # Application charts are a collection of templates that can be packaged into versioned archives 8 | # to be deployed. 9 | # 10 | # Library charts provide useful utilities or functions for the chart developer. They're included as 11 | # a dependency of application charts to inject those utilities and functions into the rendering 12 | # pipeline. Library charts do not define any templates and therefore cannot be deployed. 13 | type: application 14 | 15 | # This is the chart version. This version number should be incremented each time you make changes 16 | # to the chart and its templates, including the app version. 17 | # Versions are expected to follow Semantic Versioning (https://semver.org/) 18 | version: 0.1.8 19 | 20 | # This is the version number of the application being deployed. This version number should be 21 | # incremented each time you make changes to the application. Versions are not expected to 22 | # follow Semantic Versioning. They should reflect the version the application is using. 23 | appVersion: latest 24 | -------------------------------------------------------------------------------- /charts/odd-quicklaunch/charts/odd-platform/README.md: -------------------------------------------------------------------------------- 1 | # odd-platform 2 | 3 | ![Version: 0.1.6](https://img.shields.io/badge/Version-0.1.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) 4 | 5 | A Helm chart for Kubernetes 6 | 7 | ## Values 8 | 9 | | Key | Type | Default | Description | 10 | |-----|------|---------|-------------| 11 | | affinity | object | `{}` | | 12 | | autoscaling.enabled | bool | `false` | | 13 | | autoscaling.maxReplicas | int | `100` | | 14 | | autoscaling.minReplicas | int | `1` | | 15 | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | 16 | | config | string | `nil` | | 17 | | fullnameOverride | string | `""` | | 18 | | image.pullPolicy | string | `"IfNotPresent"` | | 19 | | image.repository | string | `"ghcr.io/opendatadiscovery/odd-platform"` | | 20 | | image.tag | string | `""` | | 21 | | imagePullSecrets | list | `[]` | | 22 | | ingress.annotations | object | `{}` | | 23 | | ingress.className | string | `""` | | 24 | | ingress.enabled | bool | `false` | | 25 | | ingress.hosts[0].host | string | `"chart-example.local"` | | 26 | | ingress.hosts[0].paths | list | `[]` | | 27 | | ingress.tls | list | `[]` | | 28 | | nameOverride | string | `""` | | 29 | | nodeSelector | object | `{}` | | 30 | | podAnnotations | object | `{}` | | 31 | | podSecurityContext | object | `{}` | | 32 | | replicaCount | int | `1` | | 33 | | resources | object | `{}` | | 34 | | securityContext | object | `{}` | | 35 | | service.annotations | object | `{}` | | 36 | | service.port | int | `80` | | 37 | | service.type | string | `"ClusterIP"` | | 38 | | serviceAccount.annotations | object | `{}` | | 39 | | serviceAccount.create | bool | `true` | | 40 | | serviceAccount.name | string | `""` | | 41 | | tolerations | list | `[]` | | 42 | 43 | ---------------------------------------------- 44 | Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) 45 | -------------------------------------------------------------------------------- /charts/odd-quicklaunch/charts/odd-platform/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "odd-platform.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 7 | {{- end }} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "odd-platform.fullname" -}} 15 | {{- if .Values.fullnameOverride }} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 17 | {{- else }} 18 | {{- $name := default .Chart.Name .Values.nameOverride }} 19 | {{- if contains $name .Release.Name }} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 21 | {{- else }} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 23 | {{- end }} 24 | {{- end }} 25 | {{- end }} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "odd-platform.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 32 | {{- end }} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "odd-platform.labels" -}} 38 | helm.sh/chart: {{ include "odd-platform.chart" . }} 39 | {{ include "odd-platform.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- end }} 45 | 46 | {{/* 47 | Selector labels 48 | */}} 49 | {{- define "odd-platform.selectorLabels" -}} 50 | app.kubernetes.io/name: {{ include "odd-platform.name" . }} 51 | app.kubernetes.io/instance: {{ .Release.Name }} 52 | {{- end }} 53 | 54 | {{/* 55 | Create the name of the service account to use 56 | */}} 57 | {{- define "odd-platform.serviceAccountName" -}} 58 | {{- if .Values.serviceAccount.create }} 59 | {{- default (include "odd-platform.fullname" .) .Values.serviceAccount.name }} 60 | {{- else }} 61 | {{- default "default" .Values.serviceAccount.name }} 62 | {{- end }} 63 | {{- end }} 64 | -------------------------------------------------------------------------------- /charts/odd-quicklaunch/charts/odd-platform/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ include "odd-platform.fullname" . }}-application-conf 5 | labels: 6 | {{- include "odd-platform.labels" . | nindent 4 }} 7 | data: 8 | application.yml: |- 9 | spring: 10 | datasource: 11 | username: "postgres" 12 | password: "{{ .Values.global.postgresql.auth.postgresPassword }}" 13 | url: "jdbc:postgresql://odd-quicklaunch-postgresql:5432/odd-platform" 14 | -------------------------------------------------------------------------------- /charts/odd-quicklaunch/charts/odd-platform/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "odd-platform.fullname" . }} 5 | labels: 6 | {{- include "odd-platform.labels" . | nindent 4 }} 7 | spec: 8 | {{- if not .Values.autoscaling.enabled }} 9 | replicas: {{ .Values.replicaCount }} 10 | {{- end }} 11 | selector: 12 | matchLabels: 13 | {{- include "odd-platform.selectorLabels" . | nindent 6 }} 14 | template: 15 | metadata: 16 | {{- with .Values.podAnnotations }} 17 | annotations: 18 | {{- toYaml . | nindent 8 }} 19 | {{- end }} 20 | labels: 21 | {{- include "odd-platform.selectorLabels" . | nindent 8 }} 22 | spec: 23 | {{- with .Values.imagePullSecrets }} 24 | imagePullSecrets: 25 | {{- toYaml . | nindent 8 }} 26 | {{- end }} 27 | serviceAccountName: {{ include "odd-platform.serviceAccountName" . }} 28 | securityContext: 29 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 30 | containers: 31 | - name: {{ .Chart.Name }} 32 | securityContext: 33 | {{- toYaml .Values.securityContext | nindent 12 }} 34 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 35 | imagePullPolicy: {{ .Values.image.pullPolicy }} 36 | ports: 37 | - name: http 38 | containerPort: 8080 39 | protocol: TCP 40 | livenessProbe: 41 | tcpSocket: 42 | port: http 43 | readinessProbe: 44 | tcpSocket: 45 | port: http 46 | resources: 47 | {{- toYaml .Values.resources | nindent 12 }} 48 | {{- if (.Values.config).env }} 49 | env: 50 | {{- toYaml .Values.config.env | nindent 12 }} 51 | {{- end }} 52 | volumeMounts: 53 | {{- if (.Values.config).yaml }} 54 | - name: odd-platform-application-conf 55 | mountPath: /app/config/ 56 | {{- end }} 57 | volumes: 58 | {{- if (.Values.config).yaml }} 59 | - name: odd-platform-application-conf 60 | configMap: 61 | name: {{ include "odd-platform.fullname" . }}-application-conf 62 | {{- end }} 63 | {{- with .Values.nodeSelector }} 64 | nodeSelector: 65 | {{- toYaml . | nindent 8 }} 66 | {{- end }} 67 | {{- with .Values.affinity }} 68 | affinity: 69 | {{- toYaml . | nindent 8 }} 70 | {{- end }} 71 | {{- with .Values.tolerations }} 72 | tolerations: 73 | {{- toYaml . | nindent 8 }} 74 | {{- end }} 75 | -------------------------------------------------------------------------------- /charts/odd-quicklaunch/charts/odd-platform/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "odd-platform.fullname" . }} 6 | labels: 7 | {{- include "odd-platform.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "odd-platform.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 21 | {{- end }} 22 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 23 | - type: Resource 24 | resource: 25 | name: memory 26 | targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 27 | {{- end }} 28 | {{- end }} 29 | -------------------------------------------------------------------------------- /charts/odd-quicklaunch/charts/odd-platform/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled -}} 2 | {{- $fullName := include "odd-platform.fullname" . -}} 3 | {{- $svcPort := .Values.service.port -}} 4 | {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} 5 | {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} 6 | {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} 7 | {{- end }} 8 | {{- end }} 9 | {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} 10 | apiVersion: networking.k8s.io/v1 11 | {{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} 12 | apiVersion: networking.k8s.io/v1beta1 13 | {{- else -}} 14 | apiVersion: extensions/v1beta1 15 | {{- end }} 16 | kind: Ingress 17 | metadata: 18 | name: {{ $fullName }} 19 | labels: 20 | {{- include "odd-platform.labels" . | nindent 4 }} 21 | {{- with .Values.ingress.annotations }} 22 | annotations: 23 | {{- toYaml . | nindent 4 }} 24 | {{- end }} 25 | spec: 26 | ingressClassName: {{ .Values.ingress.className }} 27 | {{- if .Values.ingress.tls }} 28 | tls: 29 | {{- range .Values.ingress.tls }} 30 | - hosts: 31 | {{- range .hosts }} 32 | - {{ . | quote }} 33 | {{- end }} 34 | secretName: {{ .secretName }} 35 | {{- end }} 36 | {{- end }} 37 | rules: 38 | {{- range .Values.ingress.hosts }} 39 | - host: {{ .host | quote }} 40 | http: 41 | paths: 42 | {{- range .paths }} 43 | - path: {{ .path }} 44 | {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} 45 | pathType: {{ .pathType }} 46 | {{- end }} 47 | backend: 48 | {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} 49 | service: 50 | name: {{ $fullName }} 51 | port: 52 | number: {{ $svcPort }} 53 | {{- else }} 54 | serviceName: {{ $fullName }} 55 | servicePort: {{ $svcPort }} 56 | {{- end }} 57 | {{- end }} 58 | {{- end }} 59 | {{- end }} 60 | -------------------------------------------------------------------------------- /charts/odd-quicklaunch/charts/odd-platform/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "odd-platform.fullname" . }} 5 | annotations: 6 | "service.beta.kubernetes.io/load-balancer-source-ranges": "{{ .Values.global.loadBalancerSourceRanges }}" 7 | labels: 8 | {{- include "odd-platform.labels" . | nindent 4 }} 9 | spec: 10 | type: {{ .Values.global.platformServiceType }} 11 | ports: 12 | - port: {{ .Values.service.port }} 13 | targetPort: http 14 | protocol: TCP 15 | name: http 16 | selector: 17 | {{- include "odd-platform.selectorLabels" . | nindent 4 }} 18 | -------------------------------------------------------------------------------- /charts/odd-quicklaunch/charts/odd-platform/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "odd-platform.serviceAccountName" . }} 6 | labels: 7 | {{- include "odd-platform.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /charts/odd-quicklaunch/charts/odd-platform/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for platform. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: 709825985650.dkr.ecr.us-east-1.amazonaws.com/provectus/odd 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | serviceAccount: 18 | # Specifies whether a service account should be created 19 | create: true 20 | # Annotations to add to the service account 21 | annotations: {} 22 | # The name of the service account to use. 23 | # If not set and create is true, a name is generated using the fullname template 24 | name: "" 25 | 26 | podAnnotations: {} 27 | 28 | podSecurityContext: 29 | {} 30 | # fsGroup: 2000 31 | 32 | securityContext: 33 | {} 34 | # capabilities: 35 | # drop: 36 | # - ALL 37 | # readOnlyRootFilesystem: true 38 | # runAsNonRoot: true 39 | # runAsUser: 1000 40 | 41 | config: 42 | # env: 43 | # - name: AUTH_TYPE 44 | # value: OAUTH2 45 | # - name: MANAGEMENT_HEALTH_REDIS_ENABLED 46 | # value: "false" 47 | # - name: OTEL_INSTRUMENTATION_COMMON_DB_STATEMENT_SANITIZER_ENABLED 48 | # value: "false" 49 | # - name: SPRING_DATASOURCE_URL 50 | # value: jdbc:postgresql://hostname:5432/odc 51 | # - name: SPRING_DATASOURCE_USERNAME 52 | # value: dev 53 | # yaml: 54 | # spring: 55 | # datasource: 56 | # url: jdbc:postgresql://127.0.0.1:5432/odd-platform 57 | # username: odd-platform 58 | # password: odd-platform-password 59 | 60 | service: 61 | type: ClusterIP 62 | port: 80 63 | annotations: {} 64 | 65 | ingress: 66 | enabled: false 67 | className: "" 68 | annotations: 69 | {} 70 | # kubernetes.io/ingress.class: nginx 71 | # kubernetes.io/tls-acme: "true" 72 | hosts: 73 | - host: chart-example.local 74 | paths: 75 | - path: / 76 | pathType: ImplementationSpecific 77 | tls: [] 78 | # - secretName: chart-example-tls 79 | # hosts: 80 | # - chart-example.local 81 | 82 | resources: 83 | {} 84 | # We usually recommend not to specify default resources and to leave this as a conscious 85 | # choice for the user. This also increases chances charts run on environments with little 86 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 87 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 88 | # limits: 89 | # cpu: 100m 90 | # memory: 128Mi 91 | # requests: 92 | # cpu: 100m 93 | # memory: 128Mi 94 | 95 | autoscaling: 96 | enabled: false 97 | minReplicas: 1 98 | maxReplicas: 100 99 | targetCPUUtilizationPercentage: 80 100 | # targetMemoryUtilizationPercentage: 80 101 | 102 | nodeSelector: {} 103 | 104 | tolerations: [] 105 | 106 | affinity: {} 107 | -------------------------------------------------------------------------------- /charts/odd-quicklaunch/values.yaml: -------------------------------------------------------------------------------- 1 | # Values for odd-quicklaunch. 2 | 3 | # Values for the PostgreSQL database 4 | global: 5 | postgresql: 6 | auth: 7 | postgresPassword: 8 | database: "odd-platform" 9 | loadBalancerSourceRanges: "" 10 | platformServiceType: "" 11 | 12 | # List of IP CIDRs in format delimited by comma with allowed inbound traffic 13 | loadBalancer: 14 | loadBalancerSourceRanges: "" 15 | 16 | # Values for odd-platform 17 | odd-platform: 18 | # Configuration for the odd-platform 19 | # Replace these with actual values required for odd-platform 20 | replicaCount: 1 21 | image: 22 | repository: 709825985650.dkr.ecr.us-east-1.amazonaws.com/provectus/odd 23 | pullPolicy: IfNotPresent 24 | tag: "0.21.0" 25 | service: 26 | port: 80 27 | config: 28 | yaml: 29 | spring: 30 | datasource: 31 | username: postgres 32 | 33 | postgresql: 34 | primary: 35 | persistence: 36 | enabled: false 37 | -------------------------------------------------------------------------------- /charts/odd-tracing-gateway/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: odd-tracing-gateway 3 | description: A Helm chart for Kubernetes 4 | 5 | # A chart can be either an 'application' or a 'library' chart. 6 | # 7 | # Application charts are a collection of templates that can be packaged into versioned archives 8 | # to be deployed. 9 | # 10 | # Library charts provide useful utilities or functions for the chart developer. They're included as 11 | # a dependency of application charts to inject those utilities and functions into the rendering 12 | # pipeline. Library charts do not define any templates and therefore cannot be deployed. 13 | type: application 14 | 15 | # This is the chart version. This version number should be incremented each time you make changes 16 | # to the chart and its templates, including the app version. 17 | # Versions are expected to follow Semantic Versioning (https://semver.org/) 18 | version: 0.1.7 19 | 20 | # This is the version number of the application being deployed. This version number should be 21 | # incremented each time you make changes to the application. Versions are not expected to 22 | # follow Semantic Versioning. They should reflect the version the application is using. 23 | appVersion: latest 24 | -------------------------------------------------------------------------------- /charts/odd-tracing-gateway/README.md: -------------------------------------------------------------------------------- 1 | # odd-tracing-gateway 2 | 3 | ![Version: 0.1.6](https://img.shields.io/badge/Version-0.1.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) 4 | 5 | A Helm chart for Kubernetes 6 | 7 | ## Values 8 | 9 | | Key | Type | Default | Description | 10 | |-----|------|---------|-------------| 11 | | affinity | object | `{}` | | 12 | | config | string | `nil` | | 13 | | fullnameOverride | string | `""` | | 14 | | healthchecks.enabled | bool | `true` | | 15 | | image.pullPolicy | string | `"IfNotPresent"` | | 16 | | image.repository | string | `"ghcr.io/opendatadiscovery/odd-tracing-gateway"` | | 17 | | image.tag | string | `""` | | 18 | | imagePullSecrets | list | `[]` | | 19 | | nameOverride | string | `""` | | 20 | | nodeSelector | object | `{}` | | 21 | | podAnnotations | object | `{}` | | 22 | | podSecurityContext | object | `{}` | | 23 | | replicaCount | int | `1` | | 24 | | resources | object | `{}` | | 25 | | securityContext | object | `{}` | | 26 | | service | string | `nil` | | 27 | | serviceAccount.annotations | object | `{}` | | 28 | | serviceAccount.create | bool | `true` | | 29 | | serviceAccount.name | string | `"odd-tracing-gateway"` | | 30 | | serviceAccount.roleName | string | `"odd-tracing-gateway"` | | 31 | | tolerations | list | `[]` | | 32 | 33 | ---------------------------------------------- 34 | Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) 35 | -------------------------------------------------------------------------------- /charts/odd-tracing-gateway/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "odd-tracing-gateway.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 7 | {{- end }} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "odd-tracing-gateway.fullname" -}} 15 | {{- if .Values.fullnameOverride }} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 17 | {{- else }} 18 | {{- $name := default .Chart.Name .Values.nameOverride }} 19 | {{- if contains $name .Release.Name }} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 21 | {{- else }} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 23 | {{- end }} 24 | {{- end }} 25 | {{- end }} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "odd-tracing-gateway.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 32 | {{- end }} 33 | 34 | {{/* 35 | Workaround for deploy images with hash digits instead of tag. 36 | */}} 37 | {{- define "odd-tracing-gateway.revision_delimeter" -}} 38 | {{- if contains "sha256:" .Values.image.tag -}} 39 | @ 40 | {{- else -}} 41 | : 42 | {{- end }} 43 | {{- end }} 44 | 45 | {{/* 46 | Common labels 47 | */}} 48 | {{- define "odd-tracing-gateway.labels" -}} 49 | helm.sh/chart: {{ include "odd-tracing-gateway.chart" . }} 50 | {{ include "odd-tracing-gateway.selectorLabels" . }} 51 | {{- if .Chart.AppVersion }} 52 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 53 | {{- end }} 54 | app.kubernetes.io/managed-by: {{ .Release.Service }} 55 | {{- end }} 56 | 57 | {{/* 58 | Selector labels 59 | */}} 60 | {{- define "odd-tracing-gateway.selectorLabels" -}} 61 | app.kubernetes.io/name: {{ include "odd-tracing-gateway.name" . }} 62 | app.kubernetes.io/instance: {{ .Release.Name }} 63 | {{- end }} 64 | 65 | {{/* 66 | Create the name of the service account to use 67 | */}} 68 | {{- define "odd-tracing-gateway.serviceAccountName" -}} 69 | {{- if .Values.serviceAccount.create }} 70 | {{- default (include "odd-tracing-gateway.fullname" .) .Values.serviceAccount.name }} 71 | {{- else }} 72 | {{- default "default" .Values.serviceAccount.name }} 73 | {{- end }} 74 | {{- end }} 75 | -------------------------------------------------------------------------------- /charts/odd-tracing-gateway/templates/clusterrole.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | name: {{ .Values.serviceAccount.roleName }} 6 | namespace: {{ .Release.Namespace }} 7 | labels: 8 | {{- include "odd-tracing-gateway.labels" . | nindent 4 }} 9 | rules: 10 | - apiGroups: [""] 11 | resources: ["pods", "namespaces"] 12 | verbs: ["get", "watch", "list"] 13 | {{- end }} -------------------------------------------------------------------------------- /charts/odd-tracing-gateway/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "odd-tracing-gateway.fullname" . }} 5 | labels: 6 | {{- include "odd-tracing-gateway.labels" . | nindent 4 }} 7 | spec: 8 | replicas: {{ .Values.replicaCount }} 9 | selector: 10 | matchLabels: 11 | {{- include "odd-tracing-gateway.selectorLabels" . | nindent 6 }} 12 | template: 13 | metadata: 14 | {{- with .Values.podAnnotations }} 15 | annotations: 16 | {{- toYaml . | nindent 8 }} 17 | {{- end }} 18 | labels: 19 | {{- include "odd-tracing-gateway.selectorLabels" . | nindent 8 }} 20 | spec: 21 | {{- with .Values.imagePullSecrets }} 22 | imagePullSecrets: 23 | {{- toYaml . | nindent 8 }} 24 | {{- end }} 25 | serviceAccountName: {{ include "odd-tracing-gateway.serviceAccountName" . }} 26 | securityContext: 27 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 28 | containers: 29 | - name: {{ .Chart.Name }} 30 | securityContext: 31 | {{- toYaml .Values.securityContext | nindent 12 }} 32 | image: "{{ .Values.image.repository }}{{- include "odd-tracing-gateway.revision_delimeter" . -}}{{ .Values.image.tag | default .Chart.AppVersion }}" 33 | imagePullPolicy: {{ .Values.image.pullPolicy }} 34 | ports: 35 | - name: http 36 | containerPort: 8080 37 | protocol: TCP 38 | - name: grpc 39 | containerPort: 9090 40 | protocol: TCP 41 | {{- if .Values.config -}} 42 | {{ toYaml .Values.config | nindent 10 }} 43 | {{- end }} 44 | {{- if not .Values.healthchecks.enabled }} 45 | livenessProbe: 46 | httpGet: 47 | path: /actuator/health 48 | port: http 49 | readinessProbe: 50 | httpGet: 51 | path: /actuator/health 52 | port: http 53 | {{- end }} 54 | resources: 55 | {{- toYaml .Values.resources | nindent 12 }} 56 | {{- with .Values.nodeSelector }} 57 | nodeSelector: 58 | {{- toYaml . | nindent 8 }} 59 | {{- end }} 60 | {{- with .Values.affinity }} 61 | affinity: 62 | {{- toYaml . | nindent 8 }} 63 | {{- end }} 64 | {{- with .Values.tolerations }} 65 | tolerations: 66 | {{- toYaml . | nindent 8 }} 67 | {{- end }} 68 | -------------------------------------------------------------------------------- /charts/odd-tracing-gateway/templates/rolebinding.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRoleBinding 4 | metadata: 5 | name: {{ .Values.serviceAccount.roleName }} 6 | namespace: {{ .Release.Namespace }} 7 | labels: 8 | {{- include "odd-tracing-gateway.labels" . | nindent 4 }} 9 | roleRef: 10 | apiGroup: rbac.authorization.k8s.io 11 | kind: ClusterRole 12 | name: {{ .Values.serviceAccount.roleName }} 13 | subjects: 14 | - kind: ServiceAccount 15 | name: {{ include "odd-tracing-gateway.serviceAccountName" . }} 16 | namespace: {{ .Release.Namespace }} 17 | {{- end }} -------------------------------------------------------------------------------- /charts/odd-tracing-gateway/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "odd-tracing-gateway.fullname" . }} 5 | labels: 6 | {{- include "odd-tracing-gateway.labels" . | nindent 4 }} 7 | spec: 8 | type: ClusterIP 9 | ports: 10 | - port: 8080 11 | targetPort: 8080 12 | protocol: TCP 13 | name: http 14 | - port: 9090 15 | targetPort: 9090 16 | protocol: TCP 17 | name: grpc 18 | selector: 19 | {{- include "odd-tracing-gateway.selectorLabels" . | nindent 4 }} 20 | -------------------------------------------------------------------------------- /charts/odd-tracing-gateway/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "odd-tracing-gateway.serviceAccountName" . }} 6 | namespace: {{ .Release.Namespace }} 7 | labels: 8 | {{- include "odd-tracing-gateway.labels" . | nindent 4 }} 9 | {{- with .Values.serviceAccount.annotations }} 10 | annotations: 11 | {{- toYaml . | nindent 4 }} 12 | {{- end }} 13 | {{- end }} 14 | -------------------------------------------------------------------------------- /charts/odd-tracing-gateway/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for odd-tracing-gateway. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | config: 8 | # env: 9 | # - name: USERNAME 10 | # value: 11 | # - name: PASSWORD 12 | # value: 13 | # - name: ACCOUNT_NAME 14 | # value: 15 | # - name: WAREHOUSE 16 | # value: 17 | 18 | image: 19 | repository: ghcr.io/opendatadiscovery/odd-tracing-gateway 20 | pullPolicy: IfNotPresent 21 | # Overrides the image tag whose default is the chart appVersion. 22 | tag: "" 23 | 24 | imagePullSecrets: [] 25 | nameOverride: "" 26 | fullnameOverride: "" 27 | 28 | serviceAccount: 29 | # Specifies whether a service account should be created 30 | create: true 31 | # Annotations to add to the service account 32 | annotations: {} 33 | # The name of the service account to use. 34 | # If not set and create is true, a name is generated using the fullname template 35 | name: odd-tracing-gateway 36 | roleName: odd-tracing-gateway 37 | 38 | podAnnotations: {} 39 | 40 | podSecurityContext: {} 41 | # fsGroup: 2000 42 | 43 | securityContext: {} 44 | # capabilities: 45 | # drop: 46 | # - ALL 47 | # readOnlyRootFilesystem: true 48 | # runAsNonRoot: true 49 | # runAsUser: 1000 50 | 51 | healthchecks: 52 | enabled: true 53 | 54 | service: 55 | 56 | resources: {} 57 | # We usually recommend not to specify default resources and to leave this as a conscious 58 | # choice for the user. This also increases chances charts run on environments with little 59 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 60 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 61 | # limits: 62 | # cpu: 100m 63 | # memory: 128Mi 64 | # requests: 65 | # cpu: 100m 66 | # memory: 128Mi 67 | 68 | nodeSelector: {} 69 | 70 | tolerations: [] 71 | 72 | affinity: {} 73 | -------------------------------------------------------------------------------- /cloudformation/collector-values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for odd-collector. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ghcr.io/opendatadiscovery/odd-collector 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | podAnnotations: {} 18 | 19 | podSecurityContext: 20 | {} 21 | # fsGroup: 2000 22 | 23 | securityContext: 24 | {} 25 | # capabilities: 26 | # drop: 27 | # - ALL 28 | # readOnlyRootFilesystem: true 29 | # runAsNonRoot: true 30 | # runAsUser: 1000 31 | env: [] 32 | 33 | existingSecretsForEnv: "" 34 | passwordSecretsEnvs: 35 | {} 36 | # POSTGRES_PASSWORD: "overridebyhelmsetvalue" 37 | 38 | resources: 39 | {} 40 | # We usually recommend not to specify default resources and to leave this as a conscious 41 | # choice for the user. This also increases chances charts run on environments with little 42 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 43 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 44 | # limits: 45 | # cpu: 100m 46 | # memory: 128Mi 47 | # requests: 48 | # cpu: 100m 49 | # memory: 128Mi 50 | 51 | autoscaling: 52 | enabled: false 53 | minReplicas: 1 54 | maxReplicas: 100 55 | targetCPUUtilizationPercentage: 80 56 | # targetMemoryUtilizationPercentage: 80 57 | 58 | nodeSelector: {} 59 | 60 | tolerations: [] 61 | 62 | affinity: {} 63 | 64 | collectorConfig: | 65 | default_pulling_interval: 10 66 | token: "odd-token" 67 | platform_host_url: "http://odd-platform" 68 | plugins: 69 | - type: postgresql 70 | name: odd-test 71 | host: "postgresql" 72 | port: 5432 73 | database: "odd-platform" 74 | user: "postgres" 75 | password: ${POSTGRES_PASSWORD} 76 | # - type: mysql 77 | # name: test_mysql_collector 78 | # host: "localhost" 79 | # port: 3306 80 | # database: "some_database_name" 81 | # user: "some_user_name" 82 | # password: "some_password" 83 | -------------------------------------------------------------------------------- /cloudformation/odd_cloudformation.yaml: -------------------------------------------------------------------------------- 1 | AWSTemplateFormatVersion: '2010-09-09' 2 | Description: EKS cluster using a VPC with two public subnets 3 | Parameters: 4 | NumWorkerNodes: 5 | Type: Number 6 | Description: Number of worker nodes to create 7 | Default: 1 8 | WorkerNodesInstanceType: 9 | Type: String 10 | Description: EC2 instance type for the worker nodes 11 | Default: t3.large 12 | KeyPairName: 13 | Type: String 14 | Description: Name of an existing EC2 key pair (for SSH-access to the worker node instances) 15 | Default: eks-pair 16 | Mappings: 17 | VpcIpRanges: 18 | Option1: 19 | VPC: 10.100.0.0/16 20 | PublicSubnet1 : 10.100.0.0/20 21 | PublicSubnet2: 10.100.16.0/20 22 | PrivateSubnet1: 10.100.32.0/20 23 | PrivateSubnet2: 10.100.48.0/20 24 | # IDs of the "EKS-optimised AMIs" for the worker nodes: 25 | # https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html 26 | # IMPORTANT NOTE: Choose AWS EKS compatible ami IDs only 27 | EksAmiIds: 28 | us-east-2: 29 | Standard: ami-042634d28a279f085 30 | us-east-1: 31 | Standard: ami-0474c5fe3b15d9685 32 | us-west-2: 33 | Standard: ami-084cf519d356bb718 34 | us-west-1: 35 | Standard: ami-03378d7af46c58f4c 36 | 37 | 38 | Resources: 39 | #============================================================================# 40 | # VPC 41 | #============================================================================# 42 | 43 | VPC: 44 | Type: AWS::EC2::VPC 45 | Properties: 46 | CidrBlock: !FindInMap [ VpcIpRanges, Option1, VPC ] 47 | EnableDnsSupport: true 48 | EnableDnsHostnames: true 49 | Tags: 50 | - Key: Name 51 | Value: !Ref AWS::StackName 52 | PublicSubnet1: 53 | Type: AWS::EC2::Subnet 54 | Properties: 55 | VpcId: !Ref VPC 56 | CidrBlock: !FindInMap [ VpcIpRanges, Option1, PublicSubnet1 ] 57 | # AvailabilityZone: !Select 58 | # - 0 59 | # - !GetAZs "" 60 | AvailabilityZone: !Select [ 0, !GetAZs '' ] 61 | Tags: 62 | - Key: Name 63 | Value: !Sub "${AWS::StackName}-PublicSubnet1" 64 | - Key: kubernetes.io/role/elb 65 | Value: 1 66 | - Key: !Sub "kubernetes.io/cluster/${AWS::StackName}" 67 | Value: shared 68 | PublicSubnet2: 69 | Type: AWS::EC2::Subnet 70 | Properties: 71 | VpcId: !Ref VPC 72 | CidrBlock: !FindInMap [ VpcIpRanges, Option1, PublicSubnet2 ] 73 | # AvailabilityZone: !Select 74 | # - 1 75 | # - !GetAZs "" 76 | AvailabilityZone: !Select [ 1, !GetAZs '' ] 77 | Tags: 78 | - Key: Name 79 | Value: !Sub "${AWS::StackName}-PublicSubnet2" 80 | - Key: kubernetes.io/role/elb 81 | Value: 1 82 | - Key: !Sub "kubernetes.io/cluster/${AWS::StackName}" 83 | Value: shared 84 | PrivateSubnet1: 85 | Type: AWS::EC2::Subnet 86 | Properties: 87 | VpcId: !Ref VPC 88 | CidrBlock: !FindInMap [ VpcIpRanges, Option1, PrivateSubnet1 ] 89 | # AvailabilityZone: !Select 90 | # - 1 91 | # - !GetAZs "" 92 | AvailabilityZone: !Select [ 0, !GetAZs '' ] 93 | Tags: 94 | - Key: Name 95 | Value: !Sub "${AWS::StackName}-PrivateSubnet1" 96 | - Key: kubernetes.io/role/internal-elb 97 | Value: 1 98 | - Key: !Sub "kubernetes.io/cluster/${AWS::StackName}" 99 | Value: shared 100 | PrivateSubnet2: 101 | Type: AWS::EC2::Subnet 102 | Properties: 103 | VpcId: !Ref VPC 104 | CidrBlock: !FindInMap [ VpcIpRanges, Option1, PrivateSubnet2 ] 105 | # AvailabilityZone: !Select 106 | # - 1 107 | # - !GetAZs "" 108 | AvailabilityZone: !Select [ 1, !GetAZs '' ] 109 | Tags: 110 | - Key: Name 111 | Value: !Sub "${AWS::StackName}-PrivateSubnet2" 112 | - Key: kubernetes.io/role/internal-elb 113 | Value: 1 114 | - Key: !Sub "kubernetes.io/cluster/${AWS::StackName}" 115 | Value: shared 116 | InternetGateway: 117 | Type: AWS::EC2::InternetGateway 118 | Properties: 119 | Tags: 120 | - Key: Name 121 | Value: !Ref AWS::StackName 122 | VPCGatewayAttachment: 123 | Type: AWS::EC2::VPCGatewayAttachment 124 | Properties: 125 | InternetGatewayId: !Ref InternetGateway 126 | VpcId: !Ref VPC 127 | RouteTable: 128 | Type: AWS::EC2::RouteTable 129 | Properties: 130 | VpcId: !Ref VPC 131 | Tags: 132 | - Key: Name 133 | Value: !Sub "${AWS::StackName}-PublicSubnets" 134 | InternetGatewayRoute: 135 | Type: AWS::EC2::Route 136 | # DependsOn is mandatory because route targets InternetGateway 137 | # See here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html#gatewayattachment 138 | DependsOn: VPCGatewayAttachment 139 | Properties: 140 | RouteTableId: !Ref RouteTable 141 | DestinationCidrBlock: 0.0.0.0/0 142 | GatewayId: !Ref InternetGateway 143 | NatGateway1EIP: 144 | Type: AWS::EC2::EIP 145 | DependsOn: VPCGatewayAttachment 146 | Properties: 147 | Domain: vpc 148 | NatGateway1: 149 | Type: AWS::EC2::NatGateway 150 | Properties: 151 | AllocationId: !GetAtt NatGateway1EIP.AllocationId 152 | SubnetId: !Ref PublicSubnet1 153 | PrivateRouteTable1: 154 | Type: AWS::EC2::RouteTable 155 | Properties: 156 | VpcId: !Ref VPC 157 | Tags: 158 | - Key: Name 159 | Value: !Sub ${AWS::StackName} Private Routes (AZ1) 160 | DefaultPrivateRoute1: 161 | Type: AWS::EC2::Route 162 | Properties: 163 | RouteTableId: !Ref PrivateRouteTable1 164 | DestinationCidrBlock: 0.0.0.0/0 165 | NatGatewayId: !Ref NatGateway1 166 | PrivateRouteTable2: 167 | Type: AWS::EC2::RouteTable 168 | Properties: 169 | VpcId: !Ref VPC 170 | Tags: 171 | - Key: Name 172 | Value: !Sub ${AWS::StackName} Private Routes (AZ1) 173 | DefaultPrivateRoute2: 174 | Type: AWS::EC2::Route 175 | Properties: 176 | RouteTableId: !Ref PrivateRouteTable2 177 | DestinationCidrBlock: 0.0.0.0/0 178 | NatGatewayId: !Ref NatGateway1 179 | 180 | PublicSubnet1RouteTableAssociation: 181 | Type: AWS::EC2::SubnetRouteTableAssociation 182 | Properties: 183 | SubnetId: !Ref PublicSubnet1 184 | RouteTableId: !Ref RouteTable 185 | PublicSubnet2RouteTableAssociation: 186 | Type: AWS::EC2::SubnetRouteTableAssociation 187 | Properties: 188 | SubnetId: !Ref PublicSubnet2 189 | RouteTableId: !Ref RouteTable 190 | PrivateSubnet1RouteTableAssociation: 191 | Type: AWS::EC2::SubnetRouteTableAssociation 192 | Properties: 193 | SubnetId: !Ref PrivateSubnet1 194 | RouteTableId: !Ref PrivateRouteTable1 195 | PrivateSubnet2RouteTableAssociation: 196 | Type: AWS::EC2::SubnetRouteTableAssociation 197 | Properties: 198 | SubnetId: !Ref PrivateSubnet2 199 | RouteTableId: !Ref PrivateRouteTable2 200 | KeyPair: 201 | Type: AWS::EC2::KeyPair 202 | Properties: 203 | KeyName: !Ref KeyPairName 204 | #============================================================================# 205 | # Control plane 206 | #============================================================================# 207 | 208 | ControlPlane: 209 | Type: AWS::EKS::Cluster 210 | Properties: 211 | Name: !Ref AWS::StackName 212 | Version: "1.27" 213 | RoleArn: !GetAtt ControlPlaneRole.Arn 214 | ResourcesVpcConfig: 215 | SecurityGroupIds: 216 | - !Ref ControlPlaneSecurityGroup 217 | SubnetIds: 218 | - !Ref PrivateSubnet1 219 | - !Ref PrivateSubnet2 220 | ControlPlaneRole: 221 | Type: AWS::IAM::Role 222 | Properties: 223 | AssumeRolePolicyDocument: 224 | Version: '2012-10-17' 225 | Statement: 226 | Effect: Allow 227 | Principal: 228 | Service: 229 | - eks.amazonaws.com 230 | Action: sts:AssumeRole 231 | ManagedPolicyArns: 232 | - arn:aws:iam::aws:policy/AmazonEKSClusterPolicy 233 | - arn:aws:iam::aws:policy/AmazonEKSServicePolicy 234 | 235 | #============================================================================# 236 | # Control plane security group 237 | #============================================================================# 238 | 239 | ControlPlaneSecurityGroup: 240 | Type: AWS::EC2::SecurityGroup 241 | Properties: 242 | GroupDescription: Security group for the elastic network interfaces between the control plane and the worker nodes 243 | VpcId: !Ref VPC 244 | Tags: 245 | - Key: Name 246 | Value: !Sub "${AWS::StackName}-ControlPlaneSecurityGroup" 247 | 248 | ControlPlaneIngressFromWorkerNodesHttps: 249 | Type: AWS::EC2::SecurityGroupIngress 250 | Properties: 251 | Description: Allow incoming HTTPS traffic (TCP/443) from worker nodes (for API server) 252 | GroupId: !Ref ControlPlaneSecurityGroup 253 | SourceSecurityGroupId: !Ref WorkerNodesSecurityGroup 254 | IpProtocol: tcp 255 | ToPort: 443 256 | FromPort: 443 257 | ControlPlaneEgressToWorkerNodesKubelet: 258 | Type: AWS::EC2::SecurityGroupEgress 259 | Properties: 260 | Description: Allow outgoing kubelet traffic (TCP/10250) to worker nodes 261 | GroupId: !Ref ControlPlaneSecurityGroup 262 | DestinationSecurityGroupId: !Ref WorkerNodesSecurityGroup 263 | IpProtocol: tcp 264 | FromPort: 10250 265 | ToPort: 10250 266 | ControlPlaneEgressToWorkerNodesHttps: 267 | Type: AWS::EC2::SecurityGroupEgress 268 | Properties: 269 | Description: Allow outgoing HTTPS traffic (TCP/442) to worker nodes (for pods running extension API servers) 270 | GroupId: !Ref ControlPlaneSecurityGroup 271 | DestinationSecurityGroupId: !Ref WorkerNodesSecurityGroup 272 | IpProtocol: tcp 273 | FromPort: 443 274 | ToPort: 443 275 | 276 | #============================================================================# 277 | # Worker nodes security group 278 | # Note: default egress rule (allow all traffic to all destinations) applies 279 | #============================================================================# 280 | 281 | WorkerNodesSecurityGroup: 282 | Type: AWS::EC2::SecurityGroup 283 | Properties: 284 | GroupDescription: Security group for all the worker nodes 285 | VpcId: !Ref VPC 286 | Tags: 287 | - Key: Name 288 | Value: !Sub "${AWS::StackName}-WorkerNodesSecurityGroup" 289 | - Key: !Sub "kubernetes.io/cluster/${ControlPlane}" 290 | Value: "owned" 291 | WorkerNodesIngressFromWorkerNodes: 292 | Type: AWS::EC2::SecurityGroupIngress 293 | Properties: 294 | Description: Allow all incoming traffic from other worker nodes 295 | GroupId: !Ref WorkerNodesSecurityGroup 296 | SourceSecurityGroupId: !Ref WorkerNodesSecurityGroup 297 | IpProtocol: "-1" 298 | WorkerNodesIngressFromControlPlaneKubelet: 299 | Type: AWS::EC2::SecurityGroupIngress 300 | Properties: 301 | Description: Allow incoming kubelet traffic (TCP/10250) from control plane 302 | GroupId: !Ref WorkerNodesSecurityGroup 303 | SourceSecurityGroupId: !Ref ControlPlaneSecurityGroup 304 | IpProtocol: tcp 305 | FromPort: 10250 306 | ToPort: 10250 307 | WorkerNodesIngressFromControlPlaneHttps: 308 | Type: AWS::EC2::SecurityGroupIngress 309 | Properties: 310 | Description: Allow incoming HTTPS traffic (TCP/443) from control plane (for pods running extension API servers) 311 | GroupId: !Ref WorkerNodesSecurityGroup 312 | SourceSecurityGroupId: !Ref ControlPlaneSecurityGroup 313 | IpProtocol: tcp 314 | FromPort: 443 315 | ToPort: 443 316 | 317 | #============================================================================# 318 | # Worker nodes (auto-scaling group) 319 | #============================================================================# 320 | 321 | WorkerNodesRole: 322 | Type: AWS::IAM::Role 323 | Properties: 324 | AssumeRolePolicyDocument: 325 | Version: '2012-10-17' 326 | Statement: 327 | Effect: Allow 328 | Principal: 329 | Service: 330 | - ec2.amazonaws.com 331 | Action: sts:AssumeRole 332 | ManagedPolicyArns: 333 | - arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy 334 | - arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy 335 | - arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly 336 | 337 | # IMPORTANT NOTE: We have to define NodeGroup (type: AWS::EKS::Nodegroup), without this no woker nodes will be attach to cluster 338 | WorkerNodegroup: 339 | Type: AWS::EKS::Nodegroup 340 | DependsOn: ControlPlane 341 | Properties: 342 | ClusterName: !Sub "${AWS::StackName}" 343 | NodeRole: !GetAtt WorkerNodesRole.Arn 344 | InstanceTypes: 345 | - !Ref WorkerNodesInstanceType 346 | ScalingConfig: 347 | MinSize: 348 | Ref: NumWorkerNodes 349 | DesiredSize: 350 | Ref: NumWorkerNodes 351 | MaxSize: 352 | Ref: NumWorkerNodes 353 | Subnets: 354 | - !Ref PrivateSubnet1 355 | - !Ref PrivateSubnet2 356 | Tags: 357 | Name: "WorkerNodesAutoScalingGroup" 358 | 359 | WorkerNodesLaunchConfiguration: 360 | Type: AWS::AutoScaling::LaunchConfiguration 361 | # Wait until cluster is ready before launching worker nodes 362 | DependsOn: ControlPlane 363 | Properties: 364 | AssociatePublicIpAddress: false 365 | IamInstanceProfile: !Ref WorkerNodesInstanceProfile 366 | ImageId: !FindInMap 367 | - EksAmiIds 368 | - !Ref AWS::Region 369 | - Standard 370 | InstanceType: !Ref WorkerNodesInstanceType 371 | KeyName: !Ref KeyPairName 372 | SecurityGroups: 373 | - !Ref WorkerNodesSecurityGroup 374 | 375 | # IMPORTANT NOTE: This code bootstrap some cfn settings on our ec2 machine, it require some parameters like 376 | # --stack , --resource , --region 377 | # /usr/bin/ping -c 5 google.com ( To ensure that our node have internet connectivity via NATGateway ) 378 | UserData: 379 | Fn::Base64: !Sub | 380 | #!/bin/bash 381 | set -o xtrace 382 | /etc/eks/bootstrap.sh ${ControlPlane} 383 | /opt/aws/bin/cfn-signal \ 384 | --exit-code $? \ 385 | --stack ${AWS::StackName} \ 386 | --resource WorkerNodeGroup \ 387 | --region ${AWS::Region} 388 | /usr/bin/ping -c 5 google.com 389 | WorkerNodesInstanceProfile: 390 | Type: AWS::IAM::InstanceProfile 391 | Properties: 392 | Roles: 393 | - !Ref WorkerNodesRole 394 | 395 | --------------------------------------------------------------------------------