From 7b9a60626f5328bb0ce34683e97fb1573cf72e18 Mon Sep 17 00:00:00 2001 From: mvick Date: Wed, 22 Oct 2025 15:35:22 -0400 Subject: [PATCH 01/10] feat: Add fleet config --- .fleetControl/configs.yml | 16 + .../schemas/java-config-host-1.0.0.json | 401 ++++++++++++++++++ .../schemas/java-config-k8s-1.0.0.json | 321 ++++++++++++++ 3 files changed, 738 insertions(+) create mode 100644 .fleetControl/configs.yml create mode 100644 .fleetControl/schemas/java-config-host-1.0.0.json create mode 100644 .fleetControl/schemas/java-config-k8s-1.0.0.json diff --git a/.fleetControl/configs.yml b/.fleetControl/configs.yml new file mode 100644 index 0000000000..11e1f5ff72 --- /dev/null +++ b/.fleetControl/configs.yml @@ -0,0 +1,16 @@ +configs: + # note: this file format may allow for just defining 1 config for all platforms + - name: New relic java agent config for k8s + slug: java-config # How is this slug used, can agents pick whatever they want or does this need to match something in AC? + platform: k8s # would this just be k8s vs on-host or will there be a set of agreed-upon platform options + description: java agent configuration, provided by the user + type: java-config # How is this different than the slug and what is it used for? + version: 1.0.0 # this is the schema version + schema: ./schema/java-config-k8s-1.0.0.json + - name: New relic java agent config for host + slug: java-config + platform: host + description: java agent configuration, provided by the user + type: java-config + version: 1.0.0 + schema: ./schema/java-config-host-1.0.0.json diff --git a/.fleetControl/schemas/java-config-host-1.0.0.json b/.fleetControl/schemas/java-config-host-1.0.0.json new file mode 100644 index 0000000000..74d3786a74 --- /dev/null +++ b/.fleetControl/schemas/java-config-host-1.0.0.json @@ -0,0 +1,401 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://newrelic.com/schemas/java-agent-configuration.json", + "title": "New Relic Java Agent Configuration Schema", + "description": "Schema for New Relic Java agent configuration (newrelic.yml)", + "type": "object", + "properties": { + "common": { + "type": "object", + "description": "Common configuration settings shared across all environments", + "properties": { + "license_key": { + "type": "string", + "minLength": 1, + "description": "New Relic license key", + "examples": ["<%= license_key %>", "your_license_key_here"] + }, + "agent_enabled": { + "type": "boolean", + "description": "Enable or disable the agent", + "default": true + }, + "app_name": { + "oneOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1 + } + ], + "description": "Application name(s) as they will appear in New Relic", + "examples": ["My Application", ["My App", "My App Staging"]] + }, + "high_security": { + "type": "boolean", + "description": "Enable high security mode", + "default": false + }, + "log_level": { + "type": "string", + "enum": ["off", "severe", "warning", "info", "fine", "finer", "finest"], + "description": "Log level for the agent", + "default": "info" + }, + "audit_mode": { + "type": "boolean", + "description": "Enable audit mode for debugging", + "default": false + }, + "log_file_name": { + "type": "string", + "description": "Name of the log file", + "default": "newrelic_agent.log" + }, + "log_limit_in_kbytes": { + "type": "integer", + "minimum": 0, + "description": "Maximum size of log file in kilobytes", + "default": 0 + }, + "log_daily": { + "type": "boolean", + "description": "Enable daily log rotation", + "default": false + }, + "proxy_host": { + "type": "string", + "description": "Proxy server hostname" + }, + "proxy_port": { + "type": "integer", + "minimum": 1, + "maximum": 65535, + "description": "Proxy server port" + }, + "proxy_user": { + "type": "string", + "description": "Proxy authentication username" + }, + "proxy_password": { + "type": "string", + "description": "Proxy authentication password" + }, + "capture_params": { + "type": "boolean", + "description": "Capture HTTP request parameters", + "default": false + }, + "ignored_params": { + "type": "string", + "description": "Comma-separated list of HTTP parameters to ignore" + }, + "error_collector": { + "type": "object", + "description": "Error collection configuration", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable error collection", + "default": true + }, + "capture_source": { + "type": "boolean", + "description": "Capture source code in error traces", + "default": false + }, + "ignore_errors": { + "type": "string", + "description": "Comma-separated list of exception classes to ignore" + }, + "ignore_classes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of exception classes to ignore" + }, + "ignore_status_codes": { + "type": "string", + "description": "Comma-separated list of HTTP status codes to ignore" + } + }, + "additionalProperties": false + }, + "transaction_tracer": { + "type": "object", + "description": "Transaction tracer configuration", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable transaction tracing", + "default": true + }, + "transaction_threshold": { + "oneOf": [ + { + "type": "string", + "enum": ["apdex_f"] + }, + { + "type": "number", + "minimum": 0 + } + ], + "description": "Threshold for transaction traces (seconds or 'apdex_f')", + "default": "apdex_f" + }, + "record_sql": { + "type": "string", + "enum": ["off", "obfuscated", "raw"], + "description": "SQL recording mode", + "default": "obfuscated" + }, + "explain_enabled": { + "type": "boolean", + "description": "Enable SQL explain plans", + "default": true + }, + "explain_threshold": { + "type": "number", + "minimum": 0, + "description": "Threshold for SQL explain plans (seconds)", + "default": 0.5 + }, + "stack_trace_threshold": { + "type": "number", + "minimum": 0, + "description": "Threshold for stack traces (seconds)", + "default": 0.5 + }, + "slow_query_threshold": { + "type": "number", + "minimum": 0, + "description": "Threshold for slow query traces (seconds)", + "default": 2.0 + } + }, + "additionalProperties": false + }, + "cross_application_tracer": { + "type": "object", + "description": "Cross application tracing configuration", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable cross application tracing", + "default": true + } + }, + "additionalProperties": false + }, + "thread_profiler": { + "type": "object", + "description": "Thread profiler configuration", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable thread profiling", + "default": true + } + }, + "additionalProperties": false + }, + "browser_monitoring": { + "type": "object", + "description": "Real User Monitoring (RUM) configuration", + "properties": { + "auto_instrument": { + "type": "boolean", + "description": "Enable automatic RUM injection", + "default": true + } + }, + "additionalProperties": false + }, + "class_transformer": { + "type": "object", + "description": "Class transformation configuration", + "properties": { + "com.newrelic.instrumentation.servlet-user": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": false + } + }, + "additionalProperties": false + }, + "com.newrelic.instrumentation.spring-aop-2": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": false + } + }, + "additionalProperties": false + } + }, + "additionalProperties": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "additionalProperties": false + } + }, + "labels": { + "type": "string", + "description": "Semicolon-separated list of key:value labels", + "examples": ["Server:One;Data Center:Primary"] + }, + "attributes": { + "type": "object", + "description": "Attribute configuration", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable attribute collection", + "default": true + }, + "include": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of attributes to include" + }, + "exclude": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of attributes to exclude" + } + }, + "additionalProperties": false + }, + "distributed_tracing": { + "type": "object", + "description": "Distributed tracing configuration", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable distributed tracing", + "default": false + } + }, + "additionalProperties": false + }, + "span_events": { + "type": "object", + "description": "Span events configuration", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable span events", + "default": true + }, + "max_samples_stored": { + "type": "integer", + "minimum": 0, + "description": "Maximum number of span events to store", + "default": 2000 + } + }, + "additionalProperties": false + }, + "application_logging": { + "type": "object", + "description": "Application logging configuration", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable application logging features", + "default": true + }, + "forwarding": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable log forwarding", + "default": true + }, + "max_samples_stored": { + "type": "integer", + "minimum": 0, + "description": "Maximum number of log events to store", + "default": 10000 + } + }, + "additionalProperties": false + }, + "metrics": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable logging metrics", + "default": true + } + }, + "additionalProperties": false + }, + "local_decorating": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable local log decoration", + "default": false + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + }, + "required": ["license_key", "app_name"], + "additionalProperties": false + }, + "development": { + "type": "object", + "description": "Development environment specific configuration", + "additionalProperties": true + }, + "test": { + "type": "object", + "description": "Test environment specific configuration", + "additionalProperties": true + }, + "production": { + "type": "object", + "description": "Production environment specific configuration", + "additionalProperties": true + }, + "staging": { + "type": "object", + "description": "Staging environment specific configuration", + "additionalProperties": true + } + }, + "required": ["common"], + "additionalProperties": { + "type": "object", + "description": "Custom environment configuration", + "additionalProperties": true + } +} diff --git a/.fleetControl/schemas/java-config-k8s-1.0.0.json b/.fleetControl/schemas/java-config-k8s-1.0.0.json new file mode 100644 index 0000000000..bc8ace1a62 --- /dev/null +++ b/.fleetControl/schemas/java-config-k8s-1.0.0.json @@ -0,0 +1,321 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://newrelic.com/schemas/java-agent-k8s-deployment.json", + "title": "New Relic Java Agent Kubernetes Deployment Schema", + "description": "Schema for New Relic Java agent Kubernetes deployment configuration", + "type": "object", + "properties": { + "deployment": { + "type": "object", + "description": "Deployment configuration for the Java agent", + "properties": { + "k8s": { + "type": "object", + "description": "Kubernetes-specific deployment configuration", + "properties": { + "image": { + "type": "object", + "description": "Container image configuration", + "properties": { + "repository": { + "type": "string", + "description": "Container image repository", + "examples": ["newrelic/newrelic-java-init"] + }, + "tag": { + "type": "string", + "description": "Container image tag", + "examples": ["latest", "8.14.0"] + }, + "pullPolicy": { + "type": "string", + "enum": ["Always", "IfNotPresent", "Never"], + "description": "Image pull policy", + "default": "IfNotPresent" + } + }, + "required": ["repository"], + "additionalProperties": false + }, + "initContainer": { + "type": "object", + "description": "Init container configuration for agent injection", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable init container for agent injection", + "default": true + }, + "resources": { + "type": "object", + "description": "Resource requirements for the init container", + "properties": { + "requests": { + "type": "object", + "properties": { + "cpu": { + "type": "string", + "description": "CPU request", + "examples": ["100m", "0.1"] + }, + "memory": { + "type": "string", + "description": "Memory request", + "examples": ["128Mi", "256Mi"] + } + }, + "additionalProperties": false + }, + "limits": { + "type": "object", + "properties": { + "cpu": { + "type": "string", + "description": "CPU limit", + "examples": ["200m", "0.2"] + }, + "memory": { + "type": "string", + "description": "Memory limit", + "examples": ["256Mi", "512Mi"] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "volumeMounts": { + "type": "array", + "description": "Volume mounts for the init container", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Volume name" + }, + "mountPath": { + "type": "string", + "description": "Mount path in the container" + }, + "readOnly": { + "type": "boolean", + "description": "Mount as read-only", + "default": false + } + }, + "required": ["name", "mountPath"], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + "volumes": { + "type": "array", + "description": "Volumes to be created for agent files", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Volume name" + }, + "emptyDir": { + "type": "object", + "description": "EmptyDir volume configuration", + "properties": { + "sizeLimit": { + "type": "string", + "description": "Size limit for the volume", + "examples": ["1Gi", "500Mi"] + } + }, + "additionalProperties": false + }, + "configMap": { + "type": "object", + "description": "ConfigMap volume configuration", + "properties": { + "name": { + "type": "string", + "description": "ConfigMap name" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "path": { + "type": "string" + } + }, + "required": ["key", "path"], + "additionalProperties": false + } + } + }, + "required": ["name"], + "additionalProperties": false + } + }, + "required": ["name"], + "oneOf": [ + {"required": ["emptyDir"]}, + {"required": ["configMap"]} + ], + "additionalProperties": false + } + }, + "env": { + "type": "array", + "description": "Environment variables for agent configuration", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Environment variable name" + }, + "value": { + "type": "string", + "description": "Environment variable value" + }, + "valueFrom": { + "type": "object", + "description": "Source for environment variable value", + "properties": { + "secretKeyRef": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Secret name" + }, + "key": { + "type": "string", + "description": "Secret key" + } + }, + "required": ["name", "key"], + "additionalProperties": false + }, + "configMapKeyRef": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "ConfigMap name" + }, + "key": { + "type": "string", + "description": "ConfigMap key" + } + }, + "required": ["name", "key"], + "additionalProperties": false + }, + "fieldRef": { + "type": "object", + "properties": { + "fieldPath": { + "type": "string", + "description": "Field path" + } + }, + "required": ["fieldPath"], + "additionalProperties": false + } + }, + "additionalProperties": false + } + }, + "required": ["name"], + "oneOf": [ + {"required": ["value"]}, + {"required": ["valueFrom"]} + ], + "additionalProperties": false + } + }, + "javaOpts": { + "type": "string", + "description": "Java options to be added for agent configuration", + "examples": [ + "-javaagent:/newrelic/newrelic.jar", + "-Dnewrelic.config.file=/newrelic/newrelic.yml" + ] + }, + "annotations": { + "type": "object", + "description": "Annotations to be added to pods", + "patternProperties": { + "^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?(/[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?)*$": { + "type": "string" + } + }, + "additionalProperties": false + }, + "labels": { + "type": "object", + "description": "Labels to be added to pods", + "patternProperties": { + "^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?(/[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?)*$": { + "type": "string" + } + }, + "additionalProperties": false + }, + "nodeSelector": { + "type": "object", + "description": "Node selector for pod scheduling", + "patternProperties": { + ".*": { + "type": "string" + } + }, + "additionalProperties": false + }, + "tolerations": { + "type": "array", + "description": "Tolerations for pod scheduling", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "operator": { + "type": "string", + "enum": ["Equal", "Exists"] + }, + "value": { + "type": "string" + }, + "effect": { + "type": "string", + "enum": ["NoSchedule", "PreferNoSchedule", "NoExecute"] + }, + "tolerationSeconds": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + } + }, + "required": ["k8s"], + "additionalProperties": false + } + }, + "required": ["deployment"], + "additionalProperties": false +} From 36f8e76665a0f30c16768010c9f59c171bb57e17 Mon Sep 17 00:00:00 2001 From: mvick Date: Wed, 22 Oct 2025 15:47:03 -0400 Subject: [PATCH 02/10] chore: Update comments --- .fleetControl/configs.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.fleetControl/configs.yml b/.fleetControl/configs.yml index 11e1f5ff72..47316681b0 100644 --- a/.fleetControl/configs.yml +++ b/.fleetControl/configs.yml @@ -1,10 +1,9 @@ configs: - # note: this file format may allow for just defining 1 config for all platforms - name: New relic java agent config for k8s slug: java-config # How is this slug used, can agents pick whatever they want or does this need to match something in AC? - platform: k8s # would this just be k8s vs on-host or will there be a set of agreed-upon platform options + platform: k8s # would this just be k8s vs on-host or will there be a larger set of agreed-upon platform options description: java agent configuration, provided by the user - type: java-config # How is this different than the slug and what is it used for? + type: java-config # How is this different from the slug and what is it used for? version: 1.0.0 # this is the schema version schema: ./schema/java-config-k8s-1.0.0.json - name: New relic java agent config for host From 6f30b0c1d38f901d3decffc63ddf2be227597c9c Mon Sep 17 00:00:00 2001 From: mvick Date: Tue, 28 Oct 2025 11:09:38 -0400 Subject: [PATCH 03/10] chore: Update based on design discussion --- .fleetControl/configs.yml | 4 +- ...host-1.0.0.json => java-config-1.0.0.json} | 0 .../schemas/java-config-k8s-1.0.0.json | 321 ------------------ 3 files changed, 2 insertions(+), 323 deletions(-) rename .fleetControl/schemas/{java-config-host-1.0.0.json => java-config-1.0.0.json} (100%) delete mode 100644 .fleetControl/schemas/java-config-k8s-1.0.0.json diff --git a/.fleetControl/configs.yml b/.fleetControl/configs.yml index 47316681b0..50c4bd9c8b 100644 --- a/.fleetControl/configs.yml +++ b/.fleetControl/configs.yml @@ -5,11 +5,11 @@ configs: description: java agent configuration, provided by the user type: java-config # How is this different from the slug and what is it used for? version: 1.0.0 # this is the schema version - schema: ./schema/java-config-k8s-1.0.0.json + schema: ./schema/java-config-1.0.0.json - name: New relic java agent config for host slug: java-config platform: host description: java agent configuration, provided by the user type: java-config version: 1.0.0 - schema: ./schema/java-config-host-1.0.0.json + schema: ./schema/java-config-1.0.0.json diff --git a/.fleetControl/schemas/java-config-host-1.0.0.json b/.fleetControl/schemas/java-config-1.0.0.json similarity index 100% rename from .fleetControl/schemas/java-config-host-1.0.0.json rename to .fleetControl/schemas/java-config-1.0.0.json diff --git a/.fleetControl/schemas/java-config-k8s-1.0.0.json b/.fleetControl/schemas/java-config-k8s-1.0.0.json deleted file mode 100644 index bc8ace1a62..0000000000 --- a/.fleetControl/schemas/java-config-k8s-1.0.0.json +++ /dev/null @@ -1,321 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://newrelic.com/schemas/java-agent-k8s-deployment.json", - "title": "New Relic Java Agent Kubernetes Deployment Schema", - "description": "Schema for New Relic Java agent Kubernetes deployment configuration", - "type": "object", - "properties": { - "deployment": { - "type": "object", - "description": "Deployment configuration for the Java agent", - "properties": { - "k8s": { - "type": "object", - "description": "Kubernetes-specific deployment configuration", - "properties": { - "image": { - "type": "object", - "description": "Container image configuration", - "properties": { - "repository": { - "type": "string", - "description": "Container image repository", - "examples": ["newrelic/newrelic-java-init"] - }, - "tag": { - "type": "string", - "description": "Container image tag", - "examples": ["latest", "8.14.0"] - }, - "pullPolicy": { - "type": "string", - "enum": ["Always", "IfNotPresent", "Never"], - "description": "Image pull policy", - "default": "IfNotPresent" - } - }, - "required": ["repository"], - "additionalProperties": false - }, - "initContainer": { - "type": "object", - "description": "Init container configuration for agent injection", - "properties": { - "enabled": { - "type": "boolean", - "description": "Enable init container for agent injection", - "default": true - }, - "resources": { - "type": "object", - "description": "Resource requirements for the init container", - "properties": { - "requests": { - "type": "object", - "properties": { - "cpu": { - "type": "string", - "description": "CPU request", - "examples": ["100m", "0.1"] - }, - "memory": { - "type": "string", - "description": "Memory request", - "examples": ["128Mi", "256Mi"] - } - }, - "additionalProperties": false - }, - "limits": { - "type": "object", - "properties": { - "cpu": { - "type": "string", - "description": "CPU limit", - "examples": ["200m", "0.2"] - }, - "memory": { - "type": "string", - "description": "Memory limit", - "examples": ["256Mi", "512Mi"] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "volumeMounts": { - "type": "array", - "description": "Volume mounts for the init container", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Volume name" - }, - "mountPath": { - "type": "string", - "description": "Mount path in the container" - }, - "readOnly": { - "type": "boolean", - "description": "Mount as read-only", - "default": false - } - }, - "required": ["name", "mountPath"], - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "volumes": { - "type": "array", - "description": "Volumes to be created for agent files", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Volume name" - }, - "emptyDir": { - "type": "object", - "description": "EmptyDir volume configuration", - "properties": { - "sizeLimit": { - "type": "string", - "description": "Size limit for the volume", - "examples": ["1Gi", "500Mi"] - } - }, - "additionalProperties": false - }, - "configMap": { - "type": "object", - "description": "ConfigMap volume configuration", - "properties": { - "name": { - "type": "string", - "description": "ConfigMap name" - }, - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "path": { - "type": "string" - } - }, - "required": ["key", "path"], - "additionalProperties": false - } - } - }, - "required": ["name"], - "additionalProperties": false - } - }, - "required": ["name"], - "oneOf": [ - {"required": ["emptyDir"]}, - {"required": ["configMap"]} - ], - "additionalProperties": false - } - }, - "env": { - "type": "array", - "description": "Environment variables for agent configuration", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Environment variable name" - }, - "value": { - "type": "string", - "description": "Environment variable value" - }, - "valueFrom": { - "type": "object", - "description": "Source for environment variable value", - "properties": { - "secretKeyRef": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Secret name" - }, - "key": { - "type": "string", - "description": "Secret key" - } - }, - "required": ["name", "key"], - "additionalProperties": false - }, - "configMapKeyRef": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "ConfigMap name" - }, - "key": { - "type": "string", - "description": "ConfigMap key" - } - }, - "required": ["name", "key"], - "additionalProperties": false - }, - "fieldRef": { - "type": "object", - "properties": { - "fieldPath": { - "type": "string", - "description": "Field path" - } - }, - "required": ["fieldPath"], - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "required": ["name"], - "oneOf": [ - {"required": ["value"]}, - {"required": ["valueFrom"]} - ], - "additionalProperties": false - } - }, - "javaOpts": { - "type": "string", - "description": "Java options to be added for agent configuration", - "examples": [ - "-javaagent:/newrelic/newrelic.jar", - "-Dnewrelic.config.file=/newrelic/newrelic.yml" - ] - }, - "annotations": { - "type": "object", - "description": "Annotations to be added to pods", - "patternProperties": { - "^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?(/[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?)*$": { - "type": "string" - } - }, - "additionalProperties": false - }, - "labels": { - "type": "object", - "description": "Labels to be added to pods", - "patternProperties": { - "^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?(/[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?)*$": { - "type": "string" - } - }, - "additionalProperties": false - }, - "nodeSelector": { - "type": "object", - "description": "Node selector for pod scheduling", - "patternProperties": { - ".*": { - "type": "string" - } - }, - "additionalProperties": false - }, - "tolerations": { - "type": "array", - "description": "Tolerations for pod scheduling", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "operator": { - "type": "string", - "enum": ["Equal", "Exists"] - }, - "value": { - "type": "string" - }, - "effect": { - "type": "string", - "enum": ["NoSchedule", "PreferNoSchedule", "NoExecute"] - }, - "tolerationSeconds": { - "type": "integer", - "minimum": 0 - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } - }, - "required": ["k8s"], - "additionalProperties": false - } - }, - "required": ["deployment"], - "additionalProperties": false -} From 9bc095c7db37a6db03fbceee8bd1d15a1147db28 Mon Sep 17 00:00:00 2001 From: mvick Date: Thu, 30 Oct 2025 16:45:47 -0400 Subject: [PATCH 04/10] chore: Remove version from filename --- .fleetControl/configs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.fleetControl/configs.yml b/.fleetControl/configs.yml index 50c4bd9c8b..77b81fb749 100644 --- a/.fleetControl/configs.yml +++ b/.fleetControl/configs.yml @@ -5,11 +5,11 @@ configs: description: java agent configuration, provided by the user type: java-config # How is this different from the slug and what is it used for? version: 1.0.0 # this is the schema version - schema: ./schema/java-config-1.0.0.json + schema: ./schema/java-config.json - name: New relic java agent config for host slug: java-config platform: host description: java agent configuration, provided by the user type: java-config version: 1.0.0 - schema: ./schema/java-config-1.0.0.json + schema: ./schema/java-config.json From 97559c9ff9bae1e505a10de9475448bde3172331 Mon Sep 17 00:00:00 2001 From: mvick Date: Mon, 3 Nov 2025 10:57:07 -0500 Subject: [PATCH 05/10] chore: Update platform --- .fleetControl/configs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.fleetControl/configs.yml b/.fleetControl/configs.yml index 77b81fb749..4f7428c112 100644 --- a/.fleetControl/configs.yml +++ b/.fleetControl/configs.yml @@ -1,7 +1,7 @@ configs: - name: New relic java agent config for k8s slug: java-config # How is this slug used, can agents pick whatever they want or does this need to match something in AC? - platform: k8s # would this just be k8s vs on-host or will there be a larger set of agreed-upon platform options + platform: kubernetes # would this just be k8s vs on-host or will there be a larger set of agreed-upon platform options description: java agent configuration, provided by the user type: java-config # How is this different from the slug and what is it used for? version: 1.0.0 # this is the schema version From 728ecd337060e8250809ca3f0cb3fa05df7d374b Mon Sep 17 00:00:00 2001 From: mvick Date: Tue, 11 Nov 2025 12:51:27 -0500 Subject: [PATCH 06/10] chore: Rename file --- .fleetControl/{configs.yml => configurationDefinitions.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .fleetControl/{configs.yml => configurationDefinitions.yml} (100%) diff --git a/.fleetControl/configs.yml b/.fleetControl/configurationDefinitions.yml similarity index 100% rename from .fleetControl/configs.yml rename to .fleetControl/configurationDefinitions.yml From 980141fab9df2cfdda0ab8d890535fff62e1b76a Mon Sep 17 00:00:00 2001 From: mvick Date: Wed, 12 Nov 2025 11:14:59 -0500 Subject: [PATCH 07/10] chore: Renaming --- .fleetControl/configurationDefinitions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.fleetControl/configurationDefinitions.yml b/.fleetControl/configurationDefinitions.yml index 4f7428c112..2b9fbe0217 100644 --- a/.fleetControl/configurationDefinitions.yml +++ b/.fleetControl/configurationDefinitions.yml @@ -1,4 +1,4 @@ -configs: +configurationDefinitions: - name: New relic java agent config for k8s slug: java-config # How is this slug used, can agents pick whatever they want or does this need to match something in AC? platform: kubernetes # would this just be k8s vs on-host or will there be a larger set of agreed-upon platform options From 62cc63f26e54c4bec0afece1d84d7f0eed5c0280 Mon Sep 17 00:00:00 2001 From: mvick Date: Tue, 18 Nov 2025 15:32:23 -0500 Subject: [PATCH 08/10] chore: Adding new field --- .fleetControl/configurationDefinitions.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.fleetControl/configurationDefinitions.yml b/.fleetControl/configurationDefinitions.yml index 2b9fbe0217..507645cdba 100644 --- a/.fleetControl/configurationDefinitions.yml +++ b/.fleetControl/configurationDefinitions.yml @@ -4,12 +4,14 @@ configurationDefinitions: platform: kubernetes # would this just be k8s vs on-host or will there be a larger set of agreed-upon platform options description: java agent configuration, provided by the user type: java-config # How is this different from the slug and what is it used for? + format: json # the format of the schema version: 1.0.0 # this is the schema version - schema: ./schema/java-config.json + schema: ./schemas/java-config.json - name: New relic java agent config for host slug: java-config platform: host description: java agent configuration, provided by the user type: java-config + format: json version: 1.0.0 - schema: ./schema/java-config.json + schema: ./schemas/java-config.json From 265453b36fbc6c0dff90d34079d22e732c15618c Mon Sep 17 00:00:00 2001 From: mvick Date: Tue, 18 Nov 2025 15:34:18 -0500 Subject: [PATCH 09/10] chore: Adding new file --- .../agent-schema-for-agent-control.yml | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .fleetControl/agentControl/agent-schema-for-agent-control.yml diff --git a/.fleetControl/agentControl/agent-schema-for-agent-control.yml b/.fleetControl/agentControl/agent-schema-for-agent-control.yml new file mode 100644 index 0000000000..b93dc578e7 --- /dev/null +++ b/.fleetControl/agentControl/agent-schema-for-agent-control.yml @@ -0,0 +1,61 @@ +namespace: newrelic +name: com.newrelic.apm_java +version: 0.1.0 +variables: + k8s: + version: + description: "Java Agent init container version" + type: string + default: "latest" + required: false + podLabelSelector: + description: "Pod label selector" + type: yaml + default: { } + required: false + namespaceLabelSelector: + description: "Namespace label selector" + type: yaml + default: { } + required: false + env: + description: "environment variables to pass to Java agent" + type: yaml + default: [ ] + required: false + 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 +deployment: + k8s: + health: + interval: 30s + initial_delay: 30s + objects: + instrumentation: + apiVersion: newrelic.com/v1beta1 + 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: java + image: newrelic/newrelic-java-init:${nr-var:version} + env: ${nr-var:env} + healthAgent: + image: newrelic/k8s-apm-agent-health-sidecar:${nr-var:health_version} + env: ${nr-var:health_env} + podLabelSelector: ${nr-var:podLabelSelector} + namespaceLabelSelector: ${nr-var:namespaceLabelSelector} From 21650af1d247faf72faae9020f7110dfd89a8618 Mon Sep 17 00:00:00 2001 From: mvick Date: Wed, 19 Nov 2025 09:10:28 -0500 Subject: [PATCH 10/10] chore: Updating comment --- .fleetControl/configurationDefinitions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.fleetControl/configurationDefinitions.yml b/.fleetControl/configurationDefinitions.yml index 507645cdba..118933d6fb 100644 --- a/.fleetControl/configurationDefinitions.yml +++ b/.fleetControl/configurationDefinitions.yml @@ -4,7 +4,7 @@ configurationDefinitions: platform: kubernetes # would this just be k8s vs on-host or will there be a larger set of agreed-upon platform options description: java agent configuration, provided by the user type: java-config # How is this different from the slug and what is it used for? - format: json # the format of the schema + format: yml # the format of the agent config file version: 1.0.0 # this is the schema version schema: ./schemas/java-config.json - name: New relic java agent config for host @@ -12,6 +12,6 @@ configurationDefinitions: platform: host description: java agent configuration, provided by the user type: java-config - format: json + format: yml version: 1.0.0 schema: ./schemas/java-config.json