Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 3c44ab6
Merge: 4d49290 921de36
Author: Dale Feldick <[email protected]>
Date:   Thu Jan 4 10:44:37 2024 -0700

    Merge pull request #61 from Axway/APIGOV-26840

    APIGOV-26840 - csr5

commit 921de36
Author: dfeldick <[email protected]>
Date:   Thu Jan 4 10:34:10 2024 -0700

    APIGOV-26840 - csr5

commit 4d49290
Author: Jason Collins <[email protected]>
Date:   Wed Jan 3 15:47:14 2024 -0700

    APIGOV-26882 - use service and route ids for discovery and traceability (#60)

    * update the discovery process

    * use ids for traceability agent

    * update dep

commit 28c5863
Author: Jason Collins <[email protected]>
Date:   Tue Jan 2 15:21:14 2024 -0700

    APIGOV-26853 - conditionally remove ta resource on shutdown (#59)

    * add logic to clean agent resource

    * add unit tests

    * use camel case

    * update deps

commit 576f0c2
Author: Jason Collins <[email protected]>
Date:   Tue Jan 2 09:18:59 2024 -0700

    APIGOV-26911 - properly handle query args (#58)

    * INT - add logging and request id for each connection

    * fix processing of query arguments

commit 9bb97c8
Merge: 6c03b45 acb811f
Author: Dale Feldick <[email protected]>
Date:   Fri Dec 15 14:00:47 2023 -0700

    Merge pull request #57 from Axway/APIGOV-26871

    APIGOV-26871 - update golang for security

commit acb811f
Author: dfeldick <[email protected]>
Date:   Fri Dec 15 12:06:23 2023 -0700

    APIGOV-26871 - typo

commit fe7e4e8
Author: dfeldick <[email protected]>
Date:   Fri Dec 15 11:49:00 2023 -0700

    APIGOV-26871 - fix image

commit 6c03b45
Author: Jason Collins <[email protected]>
Date:   Fri Dec 15 08:43:20 2023 -0700

    APIGOV-26852 - add tls config to kong client (#56)

    * add ssl config settings

    * docs

    * fix test

    * validte tls config

    * helm chart updates

    * handle npe

    * remove test that is not needed

commit 37dc140
Author: Dragos Gabriel Ghinea <[email protected]>
Date:   Thu Dec 14 12:08:16 2023 +0200

    APIGOV-26869 - filter enhancement/fix (#55)

    * filter enhancement/fix

    * add readme changes

commit 672c065
Author: dfeldick <[email protected]>
Date:   Wed Dec 13 15:52:03 2023 -0700

    APIGOV-26871 - update golang

commit bbdd60a
Author: Jason Collins <[email protected]>
Date:   Tue Dec 12 07:37:54 2023 -0700

    INT - update deps (#54)

    * INT - update deps

    * add lock in test to avoid negative waitgroup

commit ff8c0fe
Author: Jason Collins <[email protected]>
Date:   Mon Dec 11 08:56:49 2023 -0700

    APIGOV-26727 - fix issues found in testing from testing (#53)

    * fix issues from testing

    * stop deleting agent resource on stop

    * remove commented code

commit 8077354
Author: Dragos Gabriel Ghinea <[email protected]>
Date:   Fri Dec 8 18:08:16 2023 +0200

    APIGOV-26780 - acl plugin changes (#50)

    * acl plugin changes

    * MR issues

    * MR fixes (by actually following the ticket this time)

    * gitignore change

    * readme updates

    * MR issues + config fix + default discovery yaml

    * readme updates

    * extra readme update

    * helm fixes + rename disabled + MR issues

    * remove hasACL

    * change info to debug

    * traceability helm update

    * remove discovery yaml file

commit af42a02
Author: Jason Collins <[email protected]>
Date:   Thu Dec 7 07:26:38 2023 -0700

    INT - add unit tests (#51)

commit 8295680
Author: Jason Collins <[email protected]>
Date:   Wed Dec 6 10:22:35 2023 -0700

    APIGOV-26782 - update proxy settings (#49)

    * update config for proxy settings

    * use the new config

    * tests for routes

    * update readme and helm chart

    * add tests and handle case of no endpoints

    * update from review

    * update

    * update config val

    * update readme

    * use value instead of number

commit 696e2d5
Author: Jason Collins <[email protected]>
Date:   Tue Dec 5 07:04:01 2023 -0700

    APIGOV-26692 - config updates and tests (#48)

    * config updates and tests

    * remove comment

    * move discovery agent packages in new discovery package

    * fix gitignore to update trace agent yaml

    * fix location of files

    * add action that uploads helm chart to tag

    * update action

    * actions

    * remove dir on archive

    * update readme

commit c57fbee
Author: Jason Collins <[email protected]>
Date:   Mon Dec 4 12:25:20 2023 -0700

    use the service name as the kong proxy id (#47)

commit 1ac30e6
Author: Jason Collins <[email protected]>
Date:   Fri Dec 1 12:44:52 2023 -0700

    APIGOV-26694 - send in metric detail for each received transaction (#41)

    * updates for using metrics

    * update func name

    * updates for tests

    * updates for test coverage

    * update deps

    * add non-verbose target for test execution

    * add wait group to tests

    * use new sdk changes for sending events on shutdown

    * update deps

    * use local interface for metric collector

    * updates for helm charts

    * make consumer tags an interface

    * use statefulset for ta

    * update

    * logic fix

    * fixes from teting

    * remove old files

    * remove old files

    * remove unused vars from yaml

    * add s3 sync docs

    * update stage

    * fix consumer metrics

    * more readme updates

    * fix quota tests

    * update dep

    * update appVersion

    * add note and typos

commit cf2ea55
Author: Dragos Gabriel Ghinea <[email protected]>
Date:   Thu Nov 30 19:17:28 2023 +0200

    APIGOV-26652 - Kong admin api security enhancements (#42)

    * use proxy admin-api route

    * undo unnecessary changes to ParseProperties

    * refactor tls config

    * change port to ports + (wip) helm updates

    * Squashed commit of the following:

    commit 509f41c
    Author: Jason Collins <[email protected]>
    Date:   Tue Nov 21 08:23:27 2023 -0700

        APIGOV-26695 - update the handling and creation of api transactions for the kong agent (#40)

        * update deps

        * some refactoring for event handling

        * do not commit debug bin files

        * use server mux

        * refactor processing

        * reorganize traceability agent files

        * reorg code

        * update deps

        * Fix CRDs creation + fix credential de-provisioning + logging (#39)

        * APIGOV-26709 + APIGOV-26718

        * fix plugins test

        * more credential logging

        * change debug to info log

        * solve log issues

        * code review

        ---------

        Co-authored-by: Dragos Gabriel Ghinea <[email protected]>

    commit a129ec2
    Merge: 578441a 0291b2b
    Author: Alin Rosca <[email protected]>
    Date:   Tue Nov 21 17:17:16 2023 +0200

        Merge pull request #36 from Axway/APIGOV-26621

        APIGOV-26621 - Get spec from dev portal

    commit 0291b2b
    Merge: d3e88f0 578441a
    Author: Alin Rosca <[email protected]>
    Date:   Tue Nov 21 17:12:58 2023 +0200

        Merge branch 'main' into APIGOV-26621

    commit d3e88f0
    Author: Alin Rosca <[email protected]>
    Date:   Tue Nov 21 17:10:02 2023 +0200

        APIGOV-26621 fix PR comms

    commit 15ffe60
    Author: Alin Rosca <[email protected]>
    Date:   Fri Nov 17 11:21:44 2023 +0200

        APIGOV-26621 get spec from dev portal

    commit b7934b6
    Merge: a181051 1187f08
    Author: Alin Rosca <[email protected]>
    Date:   Fri Nov 17 11:00:50 2023 +0200

        Merge branch 'main' into APIGOV-26621

    commit a181051
    Author: Alin Rosca <[email protected]>
    Date:   Tue Nov 14 16:43:52 2023 +0200

        APIGOV-26621 fix PR comms

    commit 690002c
    Merge: 6a447cb b4fe37b
    Author: Alin Rosca <[email protected]>
    Date:   Tue Nov 14 15:20:06 2023 +0200

        Merge branch 'APIGOV-26463' into APIGOV-26621

    commit 6a447cb
    Author: Alin Rosca <[email protected]>
    Date:   Tue Nov 14 15:19:17 2023 +0200

        APIGOV-26621 get spec from local

    * add sample env vars + helm configs + MR issues

    * modify sample env vars

    * revert to original config format + helm fixes

    * another one

    * readme updates

    * another one

    * camelCase issue

    * remove route path and assume full admin api url is
    always provided

    * remove routepath from readme

    * remove unnecessary helm values

    * change default proxy ports to 0

    * merge issues

    * case issue

    ---------

    Co-authored-by: Jason Collins <[email protected]>
    Co-authored-by: Jason Collins <[email protected]>

commit 1262c18
Author: Dragos Gabriel Ghinea <[email protected]>
Date:   Thu Nov 30 18:00:55 2023 +0200

    add discovery filter config (#46)

    * initial filter

    * filter services

    * filter updates

    * reformat filter prop description

    ---------

    Co-authored-by: Jason Collins <[email protected]>

commit c1f7fbe
Author: Dragos Gabriel Ghinea <[email protected]>
Date:   Thu Nov 30 17:45:53 2023 +0200

    Discover all routes of a service, with routes equal to stages (#45)

    * fix

    * add extra log

    * add credential logs

    * MR issues

    * use multiple routes as stages

    * extra readme

    * extra extra readme

commit 0c9cc6a
Author: Jason Collins <[email protected]>
Date:   Mon Nov 27 13:52:23 2023 -0700

    INT - doc updates (#44)

    * INT - doc updates

    * INT - line feeds

    * add comma
  • Loading branch information
dgghinea committed Jan 11, 2024
1 parent 4b2285c commit ffe7f31
Show file tree
Hide file tree
Showing 68 changed files with 2,461 additions and 1,824 deletions.
9 changes: 2 additions & 7 deletions .csr-profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,12 @@
"repo_url": "https://github.com/Axway/agents-kong",
"security_guide": "https://docs.axway.com/bundle/axway_resources/page/amplify_api_management_platform_security_white_paper.html",
"requirements": {
"dependency-check": false,
"fortify": true,
"irius-risk": false,
"npm-audit": false,
"pentest": false,
"retirejs": false,
"twistlock": true,
"zap": false,
"yarn": false,
"gosec": false,
"whitesource": true,
"blackduck": true,
"third-party-policy-violation": false,
"appspider": false,
"insightvm": false
},
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/package-helm-chart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Kong Agents Helm
on:
push:
tags:
- v*.*.*

jobs:
helm-archive:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: olegtarasov/[email protected]
id: tagName
with:
tagRegex: "v(.*)"
tagRegexGroup: 1
- name: Update chart versions
run: |
sed helm/kong-agents/Chart.yaml -i -e "s/^appVersion.*/appVersion:\ \"v${GIT_TAG_NAME}\"/"
sed helm/kong-agents/Chart.yaml -i -e "s/^version.*/version:\ ${GIT_TAG_NAME}/"
- name: Archive chart
run: |
tar czf kong-agents.tgz -C helm/kong-agents .
- name: Upload chart to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: kong-agents.tgz
tag: ${{ github.ref_name }}
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ bin/
.idea/
**.tgz
.log
.env
.env*
*.pem
*.key
.DS_Store
.run/
*.log

**/kong_discovery_agent.yml
**/kong_traceability_agent.yml
pkg/discovery/main/kong_discovery_agent.yml
pkg/traceability/main/kong_traceability_agent.yml

specs/
data/
Expand Down
28 changes: 2 additions & 26 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ variables:
FORTIFY_INCLUDE: "**/*.go"
FORTIFY_EXCLUDE: "**/*_test.go"

# Whitesource
WS_PROJECT_ID: "agents-kong"
WS_CONFIG_FILE: "whitesource.config"

# Blackduck
BLACKDUCK_PROJECT_NAME: "Amplify - APIC Kong Agents"

Expand All @@ -31,12 +27,11 @@ include:
- "/gitlabci/restrictions.yml"
- "/gitlabci/jobs.yml"
- project: "scurity/gitlabci"
ref: $SCURITY_V2
ref: $SCURITY_LATEST
file:
- "/.gitlab-ci-fortify.yml"
- "/.gitlab-ci-twistlock.yml"
- "/.gitlab-ci-iriusrisk.yml"
- "/.gitlab-ci-whitesource.yml"
- "/.gitlab-ci-blackduck.yml"
- "/.gitlab-ci-csr.yml"
- project: "apigov/beano_cicd"
Expand Down Expand Up @@ -103,20 +98,7 @@ twistlock-traceability:on-schedule:
- export IMAGE_NAME=ghcr.io/axway/kong_traceability_agent:${GIT_TAG_PREFIX}${LATEST_TAG}
- docker pull ${IMAGE_NAME}

whitesource:on-schedule:
extends: .whitesource
rules:
- !reference [.mirror-schedule-csr-rules, rules]
before_script:
- git config --global http.sslVerify false
- git config --global url."ssh://[email protected]".insteadOf "https://git.ecd.axway.org"''
- git fetch
- *get-latest-tag
- echo "Checking out ${GIT_TAG_PREFIX}${LATEST_TAG}"
- git checkout ${GIT_TAG_PREFIX}${LATEST_TAG}

blackduck:on-schedule:
extends: .blackduck
rules:
- !reference [.mirror-schedule-csr-rules, rules]
before_script:
Expand All @@ -136,13 +118,7 @@ fetch-fortify:
rules:
- !reference [.mirror-branch-csr-rules, rules]

whitesource:
rules:
- !reference [.mirror-branch-csr-rules, rules]
before_script:
- export GOWORK=off

blackduck:
blackduck-rapid:
rules:
- !reference [.mirror-branch-csr-rules, rules]

Expand Down
1 change: 0 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#[CSR]
# .csr-profile.json requires SPOC approval for any modifications
.csr-profile.json @dfeldick @jcollins-axway @vivekschauhan
whitesource.config @dfeldick

#[CICD]
# cicd-related files
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ all: clean
test: dep
@go vet ${GO_PKG_LIST}
@go test -race -v -short -coverprofile=${WORKSPACE}/gocoverage.out -count=1 ${GO_PKG_LIST}

test-s: dep
@go vet ${GO_PKG_LIST}
@go test -race -short -coverprofile=${WORKSPACE}/gocoverage.out -count=1 ${GO_PKG_LIST}

clean:
@rm -rf ./bin/
Expand All @@ -44,7 +48,7 @@ ${WORKSPACE}/discovery_agent:
-X 'github.com/Axway/agent-sdk/pkg/cmd.SDKBuildVersion=$(sdk_version)' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildAgentName=KongDiscoveryAgent' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildAgentDescription=Kong Discovery Agent'" \
-a -o ${WORKSPACE}/bin/discovery_agent ${WORKSPACE}/pkg/main/discovery/main.go
-a -o ${WORKSPACE}/bin/discovery_agent ${WORKSPACE}/pkg/discovery/main/agent.go

build-da: dep ${WORKSPACE}/discovery_agent
@echo "Discovery Agent build completed"
Expand Down
339 changes: 266 additions & 73 deletions README.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions build/discovery/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Build image
# golang:1.21.3-alpine3.18 linux/amd64
FROM docker.io/golang@sha256:27c76dcf886c5024320f4fa8ceb57d907494a3bb3d477d0aa7ac8385acd871ea AS builder
# golang:1.21.5-alpine3.18 linux/amd64
FROM docker.io/golang@sha256:2aa0f0960cffcfd8daac2e765b8fdd3aa001a97d967c9ae96d58d06ff11ecdb4 AS builder

ARG commit_id
ARG version
Expand Down Expand Up @@ -33,15 +33,15 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
-X 'github.com/Axway/agent-sdk/pkg/cmd.SDKBuildVersion=${sdk_version}' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildAgentName=KongDiscoveryAgent' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildAgentDescription=Kong Discovery Agent'" \
-a -o /discovery_agent ${BASEPATH}/pkg/main/discovery/main.go
-a -o /discovery_agent ${BASEPATH}/pkg/discovery/main/agent.go

# Create non-root user
RUN addgroup -g 2500 axway && adduser -u 2500 -D -G axway axway
RUN chown -R axway:axway /discovery_agent
USER axway

# alpine 3.18.3
FROM docker.io/alpine@sha256:c5c5fda71656f28e49ac9c5416b3643eaa6a108a8093151d6d1afc9463be8e33
# alpine 3.18 linux/amd64
FROM docker.io/alpine@sha256:d695c3de6fcd8cfe3a6222b0358425d40adfd129a8a47c3416faff1a8aece389

COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /etc/passwd /etc/passwd
Expand Down
8 changes: 4 additions & 4 deletions build/traceability/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Build image
# golang:1.21.3-alpine3.18 linux/amd64
FROM docker.io/golang@sha256:27c76dcf886c5024320f4fa8ceb57d907494a3bb3d477d0aa7ac8385acd871ea AS builder
# golang:1.21.5-alpine3.18 linux/amd64
FROM docker.io/golang@sha256:2aa0f0960cffcfd8daac2e765b8fdd3aa001a97d967c9ae96d58d06ff11ecdb4 AS builder

ARG commit_id
ARG version
Expand Down Expand Up @@ -40,8 +40,8 @@ RUN addgroup -g 2500 axway && adduser -u 2500 -D -G axway axway
RUN chown -R axway:axway /traceability_agent
USER axway

# alpine 3.18.3
FROM docker.io/alpine@sha256:c5c5fda71656f28e49ac9c5416b3643eaa6a108a8093151d6d1afc9463be8e33
# alpine 3.18 linux/amd64
FROM docker.io/alpine@sha256:d695c3de6fcd8cfe3a6222b0358425d40adfd129a8a47c3416faff1a8aece389

COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /etc/passwd /etc/passwd
Expand Down
13 changes: 4 additions & 9 deletions build/traceability/kong_traceability_agent.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
kong_traceability_agent:
# Settings for connecting to Kong
kong:
admin:
url: ${KONG_ADMIN_URL}
auth:
apikey:
header: ${KONG_ADMIN_AUTH_APIKEY_HEADER}
value: ${KONG_ADMIN_AUTH_APIKEY_VALUE}
httpLogPlugin:
path: ${KONG_HTTPLOGPLUGIN_PATH}
port: ${KONG_HTTPLOGPLUGIN_PORT}
logs:
http:
path: ${KONG_LOGS_HTTP_PATH}
port: ${KONG_LOGS_HTTP_PORT}
# Settings for connecting to Amplify Central
central:
url: ${CENTRAL_URL:https://apicentral.axway.com}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ module github.com/Axway/agents-kong
go 1.18

require (
github.com/Axway/agent-sdk v1.1.68-0.20231120204404-5fa2c5b231e1
github.com/Axway/agent-sdk v1.1.72-0.20240103224310-c9edbdc66989
github.com/elastic/beats/v7 v7.17.15
github.com/google/uuid v1.3.1
github.com/kong/go-kong v0.47.0
github.com/mitchellh/mapstructure v1.5.0
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.8.4
github.com/tidwall/gjson v1.16.0
)

require (
Expand Down Expand Up @@ -124,6 +123,7 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.12.0 // indirect
github.com/subosito/gotenv v1.4.0 // indirect
github.com/tidwall/gjson v1.16.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/urso/diag v0.0.0-20200210123136-21b3cc8eb797 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/Axway/agent-sdk v1.1.68-0.20231120204404-5fa2c5b231e1 h1:UPRwbD7Hb/p4CpSHv0hDwOmjbSqYy5Fk7pSnnatDwes=
github.com/Axway/agent-sdk v1.1.68-0.20231120204404-5fa2c5b231e1/go.mod h1:Iuv9KlWksVTbTKdfs4bKVYMDc33ZTLYoHt572z2CbbI=
github.com/Axway/agent-sdk v1.1.72-0.20240103224310-c9edbdc66989 h1:ptdjxNICx+Ftau9usJbKdI0MHxpG2tjgzmW6X+MNhlc=
github.com/Axway/agent-sdk v1.1.72-0.20240103224310-c9edbdc66989/go.mod h1:Iuv9KlWksVTbTKdfs4bKVYMDc33ZTLYoHt572z2CbbI=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw=
Expand Down
4 changes: 2 additions & 2 deletions helm/kong-agents/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.0
version: 0.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.0.0"
appVersion: "v0.0.1"
26 changes: 24 additions & 2 deletions helm/kong-agents/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Traceability selector labels
*/}}
{{- define "kong-agents.traceability.selectorLabels" -}}
{{ include "kong-agents.selectorLabels" . }}
app.agent.type: traceability
{{- end }}

{{/*
Selector labels
*/}}
Expand All @@ -62,8 +70,22 @@ Create the name of the service account to use
{{- end }}

{{/*
Create the name of the service account to use
Create the env var value for spec download paths
*/}}
{{- define "kong-agents.specDownloadPathsString" -}}
{{- define "kong-agents.spec.urlPaths.string" -}}
{{- join "," .Values.kong.spec.urlPaths }}
{{- end -}}

{{/*
Create the env var value for ssl next protos
*/}}
{{- define "kong-agents.admin.ssl.nextProtos.string" -}}
{{- join "," .Values.kong.admin.ssl.nextProtos }}
{{- end -}}

{{/*
Create the env var value for ssl cipher suites
*/}}
{{- define "kong-agents.admin.ssl.cipherSuites.string" -}}
{{- join "," .Values.kong.admin.ssl.cipherSuites }}
{{- end -}}
Loading

0 comments on commit ffe7f31

Please sign in to comment.