From ec99a219126220e4f85ade6c56008fcb62e984f8 Mon Sep 17 00:00:00 2001 From: tchiotludo Date: Fri, 28 Aug 2020 23:18:43 +0200 Subject: [PATCH 1/3] feat(helm): add securityContext configuration close #360 --- helm/akhq/Chart.yaml | 2 +- helm/akhq/templates/deployment.yaml | 4 ++++ helm/akhq/values.yaml | 14 +++++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/helm/akhq/Chart.yaml b/helm/akhq/Chart.yaml index 3585986e7..65f04dfed 100644 --- a/helm/akhq/Chart.yaml +++ b/helm/akhq/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.0" description: Kafka GUI for Apache Kafka to manage topics, topics data, consumers group, schema registry, connect and more... name: akhq -version: 0.1.2 +version: 0.1.3 keywords: - kafka - confluent diff --git a/helm/akhq/templates/deployment.yaml b/helm/akhq/templates/deployment.yaml index 1d4d14d12..1048dbdda 100644 --- a/helm/akhq/templates/deployment.yaml +++ b/helm/akhq/templates/deployment.yaml @@ -37,6 +37,10 @@ spec: imagePullSecrets: {{ toYaml .Values.imagePullSecrets | indent 8 }} {{- end }} + {{- if .Values.securityContext }} + securityContext: + {{ toYaml .Values.securityContext | indent 8 }} + {{- end }} {{- if .Values.initContainers }} initContainers: {{- range $key, $value := .Values.initContainers }} diff --git a/helm/akhq/values.yaml b/helm/akhq/values.yaml index 3eaaeb8df..3bd544606 100644 --- a/helm/akhq/values.yaml +++ b/helm/akhq/values.yaml @@ -25,6 +25,7 @@ configuration: | access-log: enabled: false name: org.akhq.log.access + ##... and secret for connection information secrets: | akhq: @@ -41,10 +42,13 @@ secrets: | url: "http://connect:8083" basic-auth-username: basic-auth-user basic-auth-password: basic-auth-pass + # Any extra volumes to define for the pod (like keystore/truststore) extraVolumes: [] + # Any extra volume mounts to define for the akhq container extraVolumeMounts: [] + # Add your own init container or uncomment and modify the example. initContainers: {} # create-keystore: @@ -54,6 +58,14 @@ initContainers: {} # - mountPath: /tmp # name: certs +securityContext: {} +# capabilities: +# drop: +# - ALL +# # readOnlyRootFilesystem: true +# runAsNonRoot: true +# runAsUser: 1000 + service: enabled: true type: ClusterIP @@ -86,4 +98,4 @@ nodeSelector: {} tolerations: [] -affinity: {} \ No newline at end of file +affinity: {} From c82e6ce8b0711585aabbbc10241e504b961ea773 Mon Sep 17 00:00:00 2001 From: tchiotludo Date: Thu, 1 Oct 2020 13:56:49 +0200 Subject: [PATCH 2/3] feat(charts): fix wrong charts values relate #426 --- helm/akhq/Chart.yaml | 3 +-- helm/akhq/templates/deployment.yaml | 18 ++++++++-------- helm/akhq/values.yaml | 32 ++++++++++++++++------------- 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/helm/akhq/Chart.yaml b/helm/akhq/Chart.yaml index 65f04dfed..84f92da1f 100644 --- a/helm/akhq/Chart.yaml +++ b/helm/akhq/Chart.yaml @@ -6,8 +6,7 @@ version: 0.1.3 keywords: - kafka - confluent - - timeseries - - influxdata + - gui home: https://akhq.io icon: https://raw.githubusercontent.com/tchiotludo/akhq/master/assets/img/logo_black.png sources: diff --git a/helm/akhq/templates/deployment.yaml b/helm/akhq/templates/deployment.yaml index 1048dbdda..ff1740670 100644 --- a/helm/akhq/templates/deployment.yaml +++ b/helm/akhq/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "akhq.fullname" . }} - {{- with .Values.image.annotations }} + {{- with .Values.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} @@ -53,15 +53,13 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy | default "Always" }} env: - {{- if .Values.secrets }} - - name: MICRONAUT_ENVIRONMENTS - value: secrets - - name: MICRONAUT_CONFIG_FILES - value: /app/application.yml,/app/application-secrets.yml - {{- end }} - {{- with .Values.image.extraEnv }} -{{ toYaml . | trim | indent 10 }} - {{- end }} + {{- if $.Values.extraEnv }}{{ toYaml $.Values.extraEnv | trim | nindent 12 }}{{ end }} + {{- if .Values.secrets }} + - name: MICRONAUT_ENVIRONMENTS + value: secrets + - name: MICRONAUT_CONFIG_FILES + value: /app/application.yml,/app/application-secrets.yml + {{- end }} volumeMounts: {{- if .Values.extraVolumeMounts }}{{ toYaml .Values.extraVolumeMounts | trim | nindent 12 }}{{ end }} {{- if .Values.configuration }} diff --git a/helm/akhq/values.yaml b/helm/akhq/values.yaml index 3bd544606..1434ea52f 100644 --- a/helm/akhq/values.yaml +++ b/helm/akhq/values.yaml @@ -1,22 +1,26 @@ -#imagePullSecrets: +# imagePullSecrets: # - name: my-repository-secret image: repository: tchiotludo/akhq tag: latest - annotations: {} - #prometheus.io/scrape: 'true' - #prometheus.io/port: '8080' - #prometheus.io/path: '/metrics' - extraEnv: [] - ## You can put directly your configuration here... - # - name: AKHQ_CONFIGURATION - # value: | - # akhq: - # secrets: - # docker-kafka-server: - # properties: - # bootstrap.servers: "kafka:9092" +# custom annotations (example: for prometheus) +annotations: {} + #prometheus.io/scrape: 'true' + #prometheus.io/port: '8080' + #prometheus.io/path: '/prometheus' + +## You can put directly your configuration here... or add java opts or any other env vars +extraEnv: [] +# - name: AKHQ_CONFIGURATION +# value: | +# akhq: +# secrets: +# docker-kafka-server: +# properties: +# bootstrap.servers: "kafka:9092" +# - name: JAVA_OPTS +# value: "-Djavax.net.ssl.trustStore=/usr/local/openjdk-11/lib/security/cacerts -Djavax.net.ssl.trustStorePassword=password" ## Or you can also use configmap for the configuration... configuration: | From 8eef122e3a34c512ce4c9c240bddb37444703cfc Mon Sep 17 00:00:00 2001 From: tchiotludo Date: Sun, 11 Oct 2020 20:56:03 +0200 Subject: [PATCH 3/3] feat(docs): add readme.md & LICENSE --- .github/workflows/docs.yml | 24 ++++++++++++++++-------- README.md | 1 + artifacthub-repo.yml | 1 + helm/akhq/Chart.yaml | 2 ++ 4 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 artifacthub-repo.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 09ead656a..db9e82a26 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,6 +13,15 @@ jobs: steps: - uses: actions/checkout@v2 + # Web site + - name: Add some files + run: | + echo "akhq.io" > docs/CNAME + cp LICENSE docs/LICENSE + cp README.md docs/README.md + cp README.md docs/README + cp artifacthub-repo.yml docs/artifacthub-repo.yml + # Helm charts - uses: J12934/helm-gh-pages-action@master with: @@ -20,12 +29,6 @@ jobs: charts-folder: "helm" deploy-branch: helm - # Web site - - name: Contributor - run: | - npm i github-contributors-list - node_modules/.bin/githubcontrib --repo akhq --owner tchiotludo --format html --sortOrder desc > docs/contributors.html - # Clone helm charts - name: Clone helm charts uses: actions/checkout@v2 @@ -33,12 +36,17 @@ jobs: ref: helm path: tmp-helm - # Web site + # Add helm charts - name: Add helm charts run: | rm -rf tmp-helm/.git cp -R tmp-helm/* docs/ - echo "akhq.io" > docs/CNAME + + # Contributors + - name: Contributor + run: | + npm i github-contributors-list + node_modules/.bin/githubcontrib --repo akhq --owner tchiotludo --format html --sortOrder desc > docs/contributors.html # Deploy - name: Deploy diff --git a/README.md b/README.md index 21e0f0dbc..73fdb1b63 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ![Github Downloads](https://img.shields.io/github/downloads/tchiotludo/akhq/total) ![Github Start](https://img.shields.io/github/stars/tchiotludo/akhq.svg) ![Main](https://github.com/tchiotludo/akhq/workflows/Main/badge.svg) +[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/akhq)](https://artifacthub.io/packages/search?repo=akhq) > Kafka GUI for [Apache Kafka](http://kafka.apache.org/) to manage topics, topics data, consumers group, schema registry, connect and more... diff --git a/artifacthub-repo.yml b/artifacthub-repo.yml new file mode 100644 index 000000000..fc1d20b55 --- /dev/null +++ b/artifacthub-repo.yml @@ -0,0 +1 @@ +repositoryID: 4ff0915c-0d71-4f9b-9440-2038c81039f9 diff --git a/helm/akhq/Chart.yaml b/helm/akhq/Chart.yaml index 84f92da1f..f4dca46e5 100644 --- a/helm/akhq/Chart.yaml +++ b/helm/akhq/Chart.yaml @@ -7,6 +7,8 @@ keywords: - kafka - confluent - gui + - schema-registry + - kafka-connect home: https://akhq.io icon: https://raw.githubusercontent.com/tchiotludo/akhq/master/assets/img/logo_black.png sources: