Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .fleetControl/agentControl/agent-schema-for-agent-control.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# original source: https://github.com/newrelic/newrelic-agent-control/blob/main/agent-control/agent-type-registry/newrelic/com.newrelic.apm_python-0.1.0.yaml
namespace: newrelic
name: com.newrelic.apm_python
version: 0.1.0
variables:
k8s:
podLabelSelector:
description: "Pod label selector"
type: yaml
default: { }
required: false
containerSelector:
description: "Container selector"
type: yaml
default: { }
required: false
namespaceLabelSelector:
description: "Namespace label selector"
type: yaml
default: { }
required: false
# All 'agent' side-car related variables are flattened.
version:
description: "Python Agent init container version"
type: string
default: "latest"
required: false
env:
description: "environment variables to pass to Python agent"
type: yaml
default: [ ]
required: false
imagePullPolicy:
description: "image pull policy for the Python agent init container"
type: string
default: "Always"
required: false
resourceRequirements:
description: "resource requirements for the Python agent init container"
type: yaml
default: { }
required: false
securityContext:
description: "security context for the Python agent init container"
type: yaml
default: { }
required: false
# All health sidecar related variables are flattened and prefixed with "health_"
health_env:
description: "environment variables to pass to health sidecar"
type: yaml
default: [ ]
required: false
health_version:
description: "health sidecar image version"
type: string
default: "latest"
required: false
health_imagePullPolicy:
description: "image pull policy for the health sidecar"
type: string
default: "Always"
required: false
health_resourceRequirements:
description: "resource requirements for the health sidecar"
type: yaml
default: { }
required: false
health_securityContext:
description: "security context for the health sidecar"
type: yaml
default: { }
required: false
deployment:
k8s:
health:
interval: 30s
initial_delay: 30s
objects:
instrumentation:
apiVersion: newrelic.com/v1beta3
kind: Instrumentation
metadata:
name: ${nr-sub:agent_id}
# APM CRs should be installed in "nr-ac:namespace"
# Due to a limitation in the k8s-agents-operator, Instrumentation CRs must be installed in the same namespace as the operator.
# Hence, the namespace is set to "nr-ac:namespace_agents".
# Reference: https://github.com/newrelic/k8s-agents-operator/blob/92c19208864f051f03f457ee04b772fca5042162/api/v1beta1/instrumentation_webhook.go#L110C27-L110C72
namespace: ${nr-ac:namespace_agents}
spec:
agent:
language: python
image: newrelic/newrelic-python-init:${nr-var:version}
env: ${nr-var:env}
imagePullPolicy: ${nr-var:imagePullPolicy}
resources: ${nr-var:resourceRequirements}
securityContext: ${nr-var:securityContext}
healthAgent:
image: newrelic/k8s-apm-agent-health-sidecar:${nr-var:health_version}
env: ${nr-var:health_env}
imagePullPolicy: ${nr-var:health_imagePullPolicy}
resources: ${nr-var:health_resourceRequirements}
securityContext: ${nr-var:health_securityContext}
podLabelSelector: ${nr-var:podLabelSelector}
namespaceLabelSelector: ${nr-var:namespaceLabelSelector}
containerSelector: ${nr-var:containerSelector}
5 changes: 5 additions & 0 deletions .fleetControl/agentControlDefinitions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
agentControlDefinitions:
- platform: KUBERNETESCLUSTER
supportFromAgent: 1.0.0
supportFromAgentControl: 1.0.0
content: ./agentControl/agent-schema-for-agent-control.yml
6 changes: 6 additions & 0 deletions .fleetControl/configurationDefinitions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
configurationDefinitions:
- platform: KUBERNETESCLUSTER
description: Python agent configuration
type: agent-config
version: 1.0.0
# will add schema information here later
57 changes: 57 additions & 0 deletions .github/workflows/agent-metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Agent Metadata

permissions:
contents: read

on:
# Allows manual triggering with parameters
workflow_dispatch:
inputs:
version:
description: 'Version tag (needs to exactly match the GH tag for the release)'
required: true
type: string
agent-type:
description: 'Agent type'
required: false
default: 'NRPythonAgent'
type: string
use-cache:
description: 'Use cache'
required: false
default: true
type: boolean

# Allows calling from another workflow
workflow_call:
inputs:
version:
description: 'Version tag (needs to exactly match the GH tag for the release)'
required: true
type: string
agent-type:
description: 'Agent type'
required: false
default: 'NRPythonAgent'
type: string
use-cache:
description: 'Use cache'
required: false
default: true
type: boolean
secrets:
FC_SYS_ID_CLIENT_ID:
required: true
FC_SYS_ID_PR_KEY:
required: true

jobs:
send-agent-metadata:
uses: newrelic/newrelic-agent-init-container/.github/workflows/agent-metadata.yml@main
with:
agent-type: ${{ inputs.agent-type }}
version: ${{ inputs.version }}
use-cache: ${{ inputs.use-cache }}
secrets:
FC_SYS_ID_CLIENT_ID: ${{ secrets.FC_SYS_ID_CLIENT_ID }}
FC_SYS_ID_PR_KEY: ${{ secrets.FC_SYS_ID_PR_KEY }}
Loading