Skip to content

Commit

Permalink
Spec.php fixes and Agent updates
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-lozoya committed Apr 3, 2024
1 parent dfe5841 commit d4aa47b
Show file tree
Hide file tree
Showing 13 changed files with 160 additions and 34 deletions.
8 changes: 4 additions & 4 deletions api/v1alpha1/instrumentation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ type InstrumentationSpec struct {
// +optional
Python Python `json:"python,omitempty"`

// DotNet defines configuration for DotNet auto-instrumentation.
// DotNet defines configuration for dotnet auto-instrumentation.
// +optional
DotNet DotNet `json:"dotnet,omitempty"`

// Php defines configuration for DotNet auto-instrumentation.
// Php defines configuration for php auto-instrumentation.
// +optional
Php Php `json:"php,omitempty"`

Expand Down Expand Up @@ -161,11 +161,11 @@ type DotNet struct {
}

type Php struct {
// Image is a container image with DotNet agent and auto-instrumentation.
// Image is a container image with Php agent and auto-instrumentation.
// +optional
Image string `json:"image,omitempty"`

// Env defines DotNet specific env vars.
// Env defines Php specific env vars.
// If the former var had been defined, then the other vars would be ignored.
// +optional
Env []corev1.EnvVar `json:"env,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/instrumentation_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (r *Instrumentation) Default() {
}
if r.Spec.Php.Image == "" {
if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationPhp]; ok {
r.Spec.DotNet.Image = val
r.Spec.Php.Image = val
}
}
if r.Spec.Go.Image == "" {
Expand Down
2 changes: 1 addition & 1 deletion autoinstrumentation/dotnet/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.20.2
10.22.0
2 changes: 1 addition & 1 deletion autoinstrumentation/java/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.8.1
8.10.0
2 changes: 1 addition & 1 deletion autoinstrumentation/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"typescript": "^5.0.3"
},
"dependencies": {
"newrelic": "11.10.1",
"newrelic": "11.14.0",
"@newrelic/native-metrics": "10.0.1"
}
}
2 changes: 1 addition & 1 deletion autoinstrumentation/php/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.16.0.5
10.19.0.9
2 changes: 1 addition & 1 deletion autoinstrumentation/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
newrelic==9.6.0
newrelic==9.8.0
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ metadata:
}
]
capabilities: Basic Install
createdAt: "2024-01-31T23:37:55Z"
createdAt: "2024-04-03T02:26:38Z"
operators.operatorframework.io/builder: operator-sdk-v1.27.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4-alpha
name: newrelic-agent-operator.v0.1.3
name: newrelic-agent-operator.v0.1.4
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -153,7 +153,7 @@ spec:
- --enable-leader-election
- --zap-log-level=info
- --zap-time-encoding=rfc3339nano
image: ghcr.io/newrelic-experimental/newrelic-agent-operator/newrelic-agent-operator:0.1.3
image: ghcr.io/andrew-lozoya/newrelic-agent-operator/newrelic-agent-operator:0.1.4
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -258,7 +258,7 @@ spec:
provider:
name: New Relic
url: newrelic.com
version: 0.1.3
version: 0.1.4
webhookdefinitions:
- admissionReviewVersions:
- v1
Expand Down
9 changes: 4 additions & 5 deletions bundle/manifests/newrelic.com_instrumentations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
description: InstrumentationSpec defines the desired state of Instrumentation
properties:
dotnet:
description: DotNet defines configuration for DotNet auto-instrumentation.
description: DotNet defines configuration for dotnet auto-instrumentation.
properties:
env:
description: Env defines DotNet specific env vars. If the former
Expand Down Expand Up @@ -719,10 +719,10 @@ spec:
type: string
type: object
php:
description: Php defines configuration for DotNet auto-instrumentation.
description: Php defines configuration for php auto-instrumentation.
properties:
env:
description: Env defines DotNet specific env vars. If the former
description: Env defines Php specific env vars. If the former
var had been defined, then the other vars would be ignored.
items:
description: EnvVar represents an environment variable present
Expand Down Expand Up @@ -837,8 +837,7 @@ spec:
type: object
type: array
image:
description: Image is a container image with DotNet agent and
auto-instrumentation.
description: Image is a container image with Php agent and auto-instrumentation.
type: string
type: object
propagators:
Expand Down
130 changes: 129 additions & 1 deletion chart/templates/instrumentation-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
description: InstrumentationSpec defines the desired state of Instrumentation
properties:
dotnet:
description: DotNet defines configuration for DotNet auto-instrumentation.
description: DotNet defines configuration for dotnet auto-instrumentation.
properties:
env:
description: Env defines DotNet specific env vars. If the former
Expand Down Expand Up @@ -717,6 +717,128 @@ spec:
auto-instrumentation.
type: string
type: object
php:
description: Php defines configuration for php auto-instrumentation.
properties:
env:
description: Env defines Php specific env vars. If the former
var had been defined, then the other vars would be ignored.
items:
description: EnvVar represents an environment variable present
in a Container.
properties:
name:
description: Name of the environment variable. Must be a
C_IDENTIFIER.
type: string
value:
description: 'Variable references $(VAR_NAME) are expanded
using the previously defined environment variables in
the container and any service environment variables. If
a variable cannot be resolved, the reference in the input
string will be unchanged. Double $$ are reduced to a single
$, which allows for escaping the $(VAR_NAME) syntax: i.e.
"$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
Escaped references will never be expanded, regardless
of whether the variable exists or not. Defaults to "".'
type: string
valueFrom:
description: Source for the environment variable's value.
Cannot be used if value is not empty.
properties:
configMapKeyRef:
description: Selects a key of a ConfigMap.
properties:
key:
description: The key to select.
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind,
uid?'
type: string
optional:
description: Specify whether the ConfigMap or its
key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
fieldRef:
description: 'Selects a field of the pod: supports metadata.name,
metadata.namespace, `metadata.labels[''<KEY>'']`,
`metadata.annotations[''<KEY>'']`, spec.nodeName,
spec.serviceAccountName, status.hostIP, status.podIP,
status.podIPs.'
properties:
apiVersion:
description: Version of the schema the FieldPath
is written in terms of, defaults to "v1".
type: string
fieldPath:
description: Path of the field to select in the
specified API version.
type: string
required:
- fieldPath
type: object
x-kubernetes-map-type: atomic
resourceFieldRef:
description: 'Selects a resource of the container: only
resources limits and requests (limits.cpu, limits.memory,
limits.ephemeral-storage, requests.cpu, requests.memory
and requests.ephemeral-storage) are currently supported.'
properties:
containerName:
description: 'Container name: required for volumes,
optional for env vars'
type: string
divisor:
anyOf:
- type: integer
- type: string
description: Specifies the output format of the
exposed resources, defaults to "1"
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
resource:
description: 'Required: resource to select'
type: string
required:
- resource
type: object
x-kubernetes-map-type: atomic
secretKeyRef:
description: Selects a key of a secret in the pod's
namespace
properties:
key:
description: The key of the secret to select from. Must
be a valid secret key.
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind,
uid?'
type: string
optional:
description: Specify whether the Secret or its key
must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
required:
- name
type: object
type: array
image:
description: Image is a container image with Php agent and auto-instrumentation.
type: string
type: object
propagators:
description: Propagators defines inter-process context propagation
configuration. Values in this list will be set in the OTEL_PROPAGATORS
Expand Down Expand Up @@ -897,3 +1019,9 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
9 changes: 4 additions & 5 deletions config/crd/bases/newrelic.com_instrumentations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
description: InstrumentationSpec defines the desired state of Instrumentation
properties:
dotnet:
description: DotNet defines configuration for DotNet auto-instrumentation.
description: DotNet defines configuration for dotnet auto-instrumentation.
properties:
env:
description: Env defines DotNet specific env vars. If the former
Expand Down Expand Up @@ -718,10 +718,10 @@ spec:
type: string
type: object
php:
description: Php defines configuration for DotNet auto-instrumentation.
description: Php defines configuration for php auto-instrumentation.
properties:
env:
description: Env defines DotNet specific env vars. If the former
description: Env defines Php specific env vars. If the former
var had been defined, then the other vars would be ignored.
items:
description: EnvVar represents an environment variable present
Expand Down Expand Up @@ -836,8 +836,7 @@ spec:
type: object
type: array
image:
description: Image is a container image with DotNet agent and
auto-instrumentation.
description: Image is a container image with Php agent and auto-instrumentation.
type: string
type: object
propagators:
Expand Down
4 changes: 2 additions & 2 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: ghcr.io/newrelic-experimental/newrelic-agent-operator/newrelic-agent-operator
newTag: 0.1.3
newName: ghcr.io/andrew-lozoya/newrelic-agent-operator/newrelic-agent-operator
newTag: 0.1.4
14 changes: 7 additions & 7 deletions versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
# the docs as well.

# Represents the current release of the New Relic Operator.
newrelic-agent-operator=0.1.3
newrelic-agent-operator=0.1.4

# Represents the current release of Java instrumentation.
# Should match autoinstrumentation/java/version.txt
newrelic-instrumentation-java=8.8.1
newrelic-instrumentation-java=8.10.0

# Represents the current release of NodeJS instrumentation.
# Should match value in autoinstrumentation/nodejs/package.json
newrelic-instrumentation-nodejs=11.10.1
newrelic-instrumentation-nodejs=11.14.0

# Represents the current release of Python instrumentation.
# Should match value in autoinstrumentation/python/requirements.txt
newrelic-instrumentation-python=9.6.0
newrelic-instrumentation-python=9.8.0

# Represents the current release of DotNet instrumentation.
# Should match value in autoinstrumentation/dotnet/version.txt
newrelic-instrumentation-dotnet=10.20.2
newrelic-instrumentation-dotnet=10.22.0

# Represents the current release of PHP instrumentation.
# Should match value in autoinstrumentation/php/version.txt
newrelic-instrumentation-php=10.16.0.5
newrelic-instrumentation-php=10.19.0.9

# Represents the current release of Go instrumentation.
autoinstrumentation-go=v0.10.1-alpha
autoinstrumentation-go=v0.11.0-alpha

0 comments on commit d4aa47b

Please sign in to comment.