Skip to content

Commit a7cd4ab

Browse files
jcoscollanrjoeyaielloPhilip-R-Beckwith
authored
[pipeline-control-gateway] feat: onboard pipeline control config mode (#2319)
<!-- Thank you for contributing to New Relic's Helm charts. Before you submit this PR we'd like to make sure you are aware of our technical requirements: * https://github.com/newrelic-experimental/helm-charts/blob/master/CONTRIBUTING.md#technical-requirements For a quick overview across what we will look at reviewing your PR, please read our review guidelines: * https://github.com/newrelic-experimental/helm-charts/blob/master/REVIEW_GUIDELINES.md Following our best practices right from the start will accelerate the review process and help get your PR merged quicker. When updates to your PR are requested, please add new commits and do not squash the history. This will make it easier to identify new changes. The PR will be squashed anyways when it is merged. Thanks. For fast feedback, please @-mention maintainers that are listed in the Chart.yaml file. Please make sure you test your changes before you push them. Once pushed, a Github Action will run across your changes and do some initial checks and linting. These checks run very quickly. Please check the results. We would like these checks to pass before we even continue reviewing your changes. --> #### What this PR does / why we need it: - Onboard pipeline control config only, into the catalog metadata. - Also, update the github action to last version (with monitoringType and displayName) #### Which issue this PR fixes *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)* - fixes # #### Special notes for your reviewer: #### Checklist [Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.] - [ ] Chart Version bumped - [ ] Variables are documented in the README.md - [ ] Title of the PR starts with chart name (e.g. `[mychartname]`) # Release Notes to Publish (nr-k8s-otel-collector) If this PR contains changes in `nr-k8s-otel-collector`, please complete the following section. All other charts should ignore this section. <!--BEGIN-RELEASE-NOTES--> ## 🚀 What's Changed * Tell the world about the latest changes in the chart. <!--END-RELEASE-NOTES--> --------- Co-authored-by: Joey Aiello <joeyaiello@users.noreply.github.com> Co-authored-by: Philip-R-Beckwith <74079252+Philip-R-Beckwith@users.noreply.github.com>
1 parent 36dfe57 commit a7cd4ab

7 files changed

Lines changed: 98 additions & 5 deletions

File tree

.github/workflows/post-release-agent-metadata.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,60 @@ permissions:
66
on:
77
release:
88
types: [released]
9+
workflow_dispatch:
10+
inputs:
11+
release_tag:
12+
description: 'Release tag to simulate (e.g. pipeline-control-gateway-1.2.3)'
13+
required: true
914

1015
jobs:
1116
update-agent-metadata:
1217
name: Update metadata for ${{ matrix.chart }}
1318
runs-on: ubuntu-latest
19+
env:
20+
RELEASE_TAG: ${{ github.event.release.tag_name || github.event.inputs.release_tag }}
1421
strategy:
1522
matrix:
1623
include:
1724
- chart: nr-ebpf-agent
1825
agent-type: NReBPFAgent
1926
config-directory: charts/nr-ebpf-agent/.fleetControl
27+
monitoring-type: INFRA
28+
display-name: "New Relic eBPF Agent"
2029
- chart: nri-bundle
2130
agent-type: NRInfra
2231
config-directory: charts/nri-bundle/.fleetControl
32+
monitoring-type: INFRA
33+
display-name: "New Relic Infrastructure"
2334
- chart: nr-k8s-otel-collector
2435
agent-type: NRDOT
2536
config-directory: charts/nr-k8s-otel-collector/.fleetControl
37+
monitoring-type: INFRA
38+
display-name: "New Relic OpenTelemetry Collector"
2639
- chart: newrelic-logging
2740
agent-type: FluentBit
2841
config-directory: charts/newrelic-logging/.fleetControl
42+
monitoring-type: INFRA
43+
display-name: "Fluent Bit"
2944
- chart: pipeline-control-gateway
3045
agent-type: PipelineControlGateway
31-
config-directory: charts/pipeline-control-gateway/.fleetControl
46+
config-directory: charts/pipeline-control-gateway/.fleetControl/pipeline-control
47+
display-name: "Pipeline Control"
48+
- chart: pipeline-control-gateway
49+
agent-type: PipelineControlGatewayConfigMode
50+
config-directory: charts/pipeline-control-gateway/.fleetControl/pipeline-control-config-mode
51+
display-name: "Pipeline Control Gateway Config Mode"
3252
- chart: agent-control-deployment
3353
agent-type: NRAgentControl
3454
config-directory: charts/agent-control-deployment/.fleetControl
55+
display-name: "New Relic Agent Control"
3556
fail-fast: false
3657

3758
steps:
3859
- name: Check if release matches chart
3960
id: should-run
4061
run: |
41-
TAG="${{ github.event.release.tag_name }}"
62+
TAG="${{ env.RELEASE_TAG }}"
4263
CHART="${{ matrix.chart }}"
4364
if [[ "$TAG" == "$CHART-"* ]]; then
4465
echo "match=true" >> $GITHUB_OUTPUT
@@ -52,7 +73,7 @@ jobs:
5273
if: steps.should-run.outputs.match == 'true'
5374
uses: actions/checkout@v4
5475
with:
55-
ref: ${{ github.event.release.tag_name }}
76+
ref: ${{ env.RELEASE_TAG }}
5677

5778
- name: Extract version from release tag or values.yaml
5879
if: steps.should-run.outputs.match == 'true'
@@ -64,7 +85,7 @@ jobs:
6485
VERSION=$(yq '.image.tag' charts/${{ matrix.chart }}/values.yaml | tr -d '"')
6586
echo "Extracted version from '.image.tag' in values.yaml: $VERSION"
6687
else
67-
VERSION="${{ github.event.release.tag_name }}"
88+
VERSION="${{ env.RELEASE_TAG }}"
6889
VERSION="${VERSION#${{ matrix.chart }}-}"
6990
echo "Extracted version from tag: $VERSION"
7091
fi
@@ -91,6 +112,8 @@ jobs:
91112
newrelic-private-key: ${{ secrets.NEWRELIC_PRIVATE_KEY }}
92113
agent-type: ${{ matrix.agent-type }}
93114
version: ${{ steps.version.outputs.version }}
94-
git-ref: ${{ github.event.release.tag_name }}
115+
git-ref: ${{ env.RELEASE_TAG }}
95116
config-directory: ${{ matrix.config-directory }}
117+
monitoring-type: ${{ matrix.monitoring-type }}
118+
display-name: ${{ matrix.display-name }}
96119
apm-control-nr-license-key: ${{ secrets.APM_CONTROL_NR_LICENSE_KEY_STAGING }}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
namespace: newrelic
2+
name: com.newrelic.pipeline_control_gateway_config_mode
3+
version: 0.1.0
4+
platform: kubernetes
5+
protocol_version: "1.0"
6+
variables:
7+
config:
8+
description: "OTel Collector configuration for the Pipeline Control Gateway"
9+
type: yaml
10+
required: true
11+
config_map_name:
12+
description: "Name of the ConfigMap that AC creates and PCG mounts as its configuration source"
13+
type: string
14+
required: false
15+
default: "pipeline-control-gateway-custom-config"
16+
deployment_name:
17+
description: "Name of the Pipeline Control deployment for health-checks"
18+
type: string
19+
required: false
20+
default: "pipeline-control-gateway"
21+
daemonset_name:
22+
description: "Name of the Pipeline Control daemonset for health-checks (used when PCG is deployed as a DaemonSet via daemonset.enabled=true)"
23+
type: string
24+
required: false
25+
default: "pipeline-control-gateway-daemonset"
26+
27+
deployment:
28+
health:
29+
interval: 30s
30+
initial_delay: 15s
31+
# Both checks coexist: PCG's chart renders either a Deployment or a DaemonSet (mutually
32+
# exclusive via daemonset.enabled). The unused workload simply isn't found by name and the
33+
# corresponding check is treated as healthy, so the agent reports healthy in both modes.
34+
checks:
35+
- namespace: ${nr-ac:namespace_agents}
36+
name: ${nr-var:deployment_name}
37+
kind: Deployment
38+
target_namespace: ${nr-ac:namespace_agents}
39+
- namespace: ${nr-ac:namespace_agents}
40+
name: ${nr-var:daemonset_name}
41+
kind: DaemonSet
42+
target_namespace: ${nr-ac:namespace_agents}
43+
objects:
44+
config:
45+
apiVersion: v1
46+
kind: ConfigMap
47+
metadata:
48+
name: ${nr-var:config_map_name}
49+
namespace: ${nr-ac:namespace_agents}
50+
data:
51+
deployment-config.yaml: |
52+
${nr-var:config}
53+
# This is required as it is also defined in:
54+
# https://github.com/newrelic/helm-charts/blob/8c3b88bdf03e600aec8a5d94bab80635b4eec671/charts/pipeline-control-gateway/templates/deployment-configmap.yaml#L7
55+
gateway-config.yaml: |
56+
reserved_melt_attributes:
57+
Metric:
58+
- interval.ms
59+
- metricName

charts/pipeline-control-gateway/.fleetControl/agentControlDefinitions.yml renamed to charts/pipeline-control-gateway/.fleetControl/pipeline-control-config-mode/agentControlDefinitions.yml

File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
configurationDefinitions:
2+
- platform: KUBERNETESCLUSTER
3+
description: Pipeline Control gateway config mode agent config
4+
type: agent-config
5+
version: 1.0.0
6+
format: yml

charts/pipeline-control-gateway/.fleetControl/agentControl/kubernetes.yml renamed to charts/pipeline-control-gateway/.fleetControl/pipeline-control/agentControl/kubernetes.yml

File renamed without changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
agentControlDefinitions:
2+
- platform: KUBERNETESCLUSTER
3+
supportFromAgent: 1.0.0
4+
supportFromAgentControl: 1.0.0
5+
content: ./agentControl/kubernetes.yml

charts/pipeline-control-gateway/.fleetControl/configurationDefinitions.yml renamed to charts/pipeline-control-gateway/.fleetControl/pipeline-control/configurationDefinitions.yml

File renamed without changes.

0 commit comments

Comments
 (0)