|
| 1 | +# Copyright 2010 New Relic, Inc. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +# 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 |
| 16 | +namespace: newrelic |
| 17 | +name: com.newrelic.apm_python |
| 18 | +version: 0.1.0 |
| 19 | +variables: |
| 20 | + k8s: |
| 21 | + podLabelSelector: |
| 22 | + description: "Pod label selector" |
| 23 | + type: yaml |
| 24 | + default: {} |
| 25 | + required: false |
| 26 | + containerSelector: |
| 27 | + description: "Container selector" |
| 28 | + type: yaml |
| 29 | + default: {} |
| 30 | + required: false |
| 31 | + namespaceLabelSelector: |
| 32 | + description: "Namespace label selector" |
| 33 | + type: yaml |
| 34 | + default: {} |
| 35 | + required: false |
| 36 | + # All 'agent' side-car related variables are flattened. |
| 37 | + version: |
| 38 | + description: "Python Agent init container version" |
| 39 | + type: string |
| 40 | + default: "latest" |
| 41 | + required: false |
| 42 | + env: |
| 43 | + description: "environment variables to pass to Python agent" |
| 44 | + type: yaml |
| 45 | + default: [] |
| 46 | + required: false |
| 47 | + imagePullPolicy: |
| 48 | + description: "image pull policy for the Python agent init container" |
| 49 | + type: string |
| 50 | + default: "Always" |
| 51 | + required: false |
| 52 | + resourceRequirements: |
| 53 | + description: "resource requirements for the Python agent init container" |
| 54 | + type: yaml |
| 55 | + default: {} |
| 56 | + required: false |
| 57 | + securityContext: |
| 58 | + description: "security context for the Python agent init container" |
| 59 | + type: yaml |
| 60 | + default: {} |
| 61 | + required: false |
| 62 | + # All health sidecar related variables are flattened and prefixed with "health_" |
| 63 | + health_env: |
| 64 | + description: "environment variables to pass to health sidecar" |
| 65 | + type: yaml |
| 66 | + default: [] |
| 67 | + required: false |
| 68 | + health_version: |
| 69 | + description: "health sidecar image version" |
| 70 | + type: string |
| 71 | + default: "latest" |
| 72 | + required: false |
| 73 | + health_imagePullPolicy: |
| 74 | + description: "image pull policy for the health sidecar" |
| 75 | + type: string |
| 76 | + default: "Always" |
| 77 | + required: false |
| 78 | + health_resourceRequirements: |
| 79 | + description: "resource requirements for the health sidecar" |
| 80 | + type: yaml |
| 81 | + default: {} |
| 82 | + required: false |
| 83 | + health_securityContext: |
| 84 | + description: "security context for the health sidecar" |
| 85 | + type: yaml |
| 86 | + default: {} |
| 87 | + required: false |
| 88 | +deployment: |
| 89 | + k8s: |
| 90 | + health: |
| 91 | + interval: 30s |
| 92 | + initial_delay: 30s |
| 93 | + objects: |
| 94 | + instrumentation: |
| 95 | + apiVersion: newrelic.com/v1beta3 |
| 96 | + kind: Instrumentation |
| 97 | + metadata: |
| 98 | + name: ${nr-sub:agent_id} |
| 99 | + # APM CRs should be installed in "nr-ac:namespace" |
| 100 | + # Due to a limitation in the k8s-agents-operator, Instrumentation CRs must be installed in the same namespace as the operator. |
| 101 | + # Hence, the namespace is set to "nr-ac:namespace_agents". |
| 102 | + # Reference: https://github.com/newrelic/k8s-agents-operator/blob/92c19208864f051f03f457ee04b772fca5042162/api/v1beta1/instrumentation_webhook.go#L110C27-L110C72 |
| 103 | + namespace: ${nr-ac:namespace_agents} |
| 104 | + spec: |
| 105 | + agent: |
| 106 | + language: python |
| 107 | + image: newrelic/newrelic-python-init:${nr-var:version} |
| 108 | + env: ${nr-var:env} |
| 109 | + imagePullPolicy: ${nr-var:imagePullPolicy} |
| 110 | + resources: ${nr-var:resourceRequirements} |
| 111 | + securityContext: ${nr-var:securityContext} |
| 112 | + healthAgent: |
| 113 | + image: newrelic/k8s-apm-agent-health-sidecar:${nr-var:health_version} |
| 114 | + env: ${nr-var:health_env} |
| 115 | + imagePullPolicy: ${nr-var:health_imagePullPolicy} |
| 116 | + resources: ${nr-var:health_resourceRequirements} |
| 117 | + securityContext: ${nr-var:health_securityContext} |
| 118 | + podLabelSelector: ${nr-var:podLabelSelector} |
| 119 | + namespaceLabelSelector: ${nr-var:namespaceLabelSelector} |
| 120 | + containerSelector: ${nr-var:containerSelector} |
0 commit comments