Skip to content

Commit

Permalink
Merge pull request #137 from newrelic/thande/update-make_build
Browse files Browse the repository at this point in the history
chore: update make build
  • Loading branch information
thande authored Jul 9, 2021
2 parents b2e0a26 + 2397fd9 commit 5e1bd54
Show file tree
Hide file tree
Showing 12 changed files with 311 additions and 94 deletions.
4 changes: 3 additions & 1 deletion api/v1/alerts_nrqlcondition_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ package v1
import (
"context"
"errors"
"github.com/newrelic/newrelic-kubernetes-operator/interfaces"

v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/newrelic/newrelic-kubernetes-operator/interfaces"

"github.com/newrelic/newrelic-client-go/pkg/alerts"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand Down
22 changes: 22 additions & 0 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 36 additions & 17 deletions config/crd/bases/nr.k8s.newrelic.com_alertsapmconditions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ spec:
description: AlertsAPMCondition is the Schema for the alertsapmconditions API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
Expand All @@ -50,7 +54,8 @@ spec:
type: object
apm_terms:
items:
description: AlertConditionTerm represents the terms of a New Relic alert condition.
description: AlertConditionTerm represents the terms of a New Relic
alert condition.
properties:
duration:
type: string
Expand Down Expand Up @@ -92,33 +97,39 @@ spec:
type: string
terms:
items:
description: AlertsNrqlConditionTerm represents the terms of a New Relic alert condition.
description: AlertsNrqlConditionTerm represents the terms of a New
Relic alert condition.
properties:
operator:
description: AlertsNrqlConditionTermsOperator - Operator used to compare against the threshold for NrqlConditions.
description: AlertsNRQLConditionTermsOperator - Operator used
to compare against the threshold for NrqlConditions.
type: string
priority:
description: NrqlConditionPriority specifies the priority for alert condition terms.
description: NrqlConditionPriority specifies the priority for
alert condition terms.
type: string
threshold:
type: string
threshold_duration:
type: integer
threshold_occurrences:
description: ThresholdOccurrence specifies the threshold occurrence for NRQL alert condition terms.
description: ThresholdOccurrence specifies the threshold occurrence
for NRQL alert condition terms.
type: string
type: object
type: array
type:
description: NrqlConditionType specifies the type of NRQL alert condition.
type: string
user_defined:
description: ConditionUserDefined represents user defined metrics for the New Relic alert condition.
description: ConditionUserDefined represents user defined metrics for
the New Relic alert condition.
properties:
metric:
type: string
value_function:
description: ValueFunctionType specifies the value function to be used for returning custom metric data.
description: ValueFunctionType specifies the value function to be
used for returning custom metric data.
type: string
type: object
violation_close_timer:
Expand Down Expand Up @@ -147,7 +158,8 @@ spec:
type: object
apm_terms:
items:
description: AlertConditionTerm represents the terms of a New Relic alert condition.
description: AlertConditionTerm represents the terms of a New
Relic alert condition.
properties:
duration:
type: string
Expand Down Expand Up @@ -189,33 +201,40 @@ spec:
type: string
terms:
items:
description: AlertsNrqlConditionTerm represents the terms of a New Relic alert condition.
description: AlertsNrqlConditionTerm represents the terms of a
New Relic alert condition.
properties:
operator:
description: AlertsNrqlConditionTermsOperator - Operator used to compare against the threshold for NrqlConditions.
description: AlertsNRQLConditionTermsOperator - Operator used
to compare against the threshold for NrqlConditions.
type: string
priority:
description: NrqlConditionPriority specifies the priority for alert condition terms.
description: NrqlConditionPriority specifies the priority
for alert condition terms.
type: string
threshold:
type: string
threshold_duration:
type: integer
threshold_occurrences:
description: ThresholdOccurrence specifies the threshold occurrence for NRQL alert condition terms.
description: ThresholdOccurrence specifies the threshold occurrence
for NRQL alert condition terms.
type: string
type: object
type: array
type:
description: NrqlConditionType specifies the type of NRQL alert condition.
description: NrqlConditionType specifies the type of NRQL alert
condition.
type: string
user_defined:
description: ConditionUserDefined represents user defined metrics for the New Relic alert condition.
description: ConditionUserDefined represents user defined metrics
for the New Relic alert condition.
properties:
metric:
type: string
value_function:
description: ValueFunctionType specifies the value function to be used for returning custom metric data.
description: ValueFunctionType specifies the value function
to be used for returning custom metric data.
type: string
type: object
violation_close_timer:
Expand Down
8 changes: 6 additions & 2 deletions config/crd/bases/nr.k8s.newrelic.com_alertschannels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ spec:
description: AlertsChannel is the Schema for the AlertsChannel API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
Expand Down
62 changes: 42 additions & 20 deletions config/crd/bases/nr.k8s.newrelic.com_alertsnrqlconditions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@ spec:
subresources: {}
validation:
openAPIV3Schema:
description: AlertsNrqlCondition is the Schema for the alertsnrqlconditions API
description: AlertsNrqlCondition is the Schema for the alertsnrqlconditions
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
Expand All @@ -50,7 +55,8 @@ spec:
type: object
apm_terms:
items:
description: AlertConditionTerm represents the terms of a New Relic alert condition.
description: AlertConditionTerm represents the terms of a New Relic
alert condition.
properties:
duration:
type: string
Expand Down Expand Up @@ -97,7 +103,8 @@ spec:
name:
type: string
nrql:
description: NrqlConditionQuery represents the NRQL query object returned in a NerdGraph response object.
description: NrqlConditionQuery represents the NRQL query object returned
in a NerdGraph response object.
properties:
evaluationOffset:
type: integer
Expand All @@ -124,31 +131,37 @@ spec:
type: object
terms:
items:
description: AlertsNrqlConditionTerm represents the terms of a New Relic alert condition.
description: AlertsNrqlConditionTerm represents the terms of a New
Relic alert condition.
properties:
operator:
description: AlertsNrqlConditionTermsOperator - Operator used to compare against the threshold for NrqlConditions.
description: AlertsNRQLConditionTermsOperator - Operator used
to compare against the threshold for NrqlConditions.
type: string
priority:
description: NrqlConditionPriority specifies the priority for alert condition terms.
description: NrqlConditionPriority specifies the priority for
alert condition terms.
type: string
threshold:
type: string
threshold_duration:
type: integer
threshold_occurrences:
description: ThresholdOccurrence specifies the threshold occurrence for NRQL alert condition terms.
description: ThresholdOccurrence specifies the threshold occurrence
for NRQL alert condition terms.
type: string
type: object
type: array
type:
description: NrqlConditionType specifies the type of NRQL alert condition.
type: string
valueFunction:
description: NrqlConditionValueFunction specifies the value function of NRQL alert condition.
description: NrqlConditionValueFunction specifies the value function
of NRQL alert condition.
type: string
violationTimeLimit:
description: NrqlConditionViolationTimeLimit specifies the value function of NRQL alert condition.
description: NrqlConditionViolationTimeLimit specifies the value function
of NRQL alert condition.
type: string
required:
- enabled
Expand All @@ -174,7 +187,8 @@ spec:
type: object
apm_terms:
items:
description: AlertConditionTerm represents the terms of a New Relic alert condition.
description: AlertConditionTerm represents the terms of a New
Relic alert condition.
properties:
duration:
type: string
Expand Down Expand Up @@ -221,7 +235,8 @@ spec:
name:
type: string
nrql:
description: NrqlConditionQuery represents the NRQL query object returned in a NerdGraph response object.
description: NrqlConditionQuery represents the NRQL query object
returned in a NerdGraph response object.
properties:
evaluationOffset:
type: integer
Expand All @@ -248,31 +263,38 @@ spec:
type: object
terms:
items:
description: AlertsNrqlConditionTerm represents the terms of a New Relic alert condition.
description: AlertsNrqlConditionTerm represents the terms of a
New Relic alert condition.
properties:
operator:
description: AlertsNrqlConditionTermsOperator - Operator used to compare against the threshold for NrqlConditions.
description: AlertsNRQLConditionTermsOperator - Operator used
to compare against the threshold for NrqlConditions.
type: string
priority:
description: NrqlConditionPriority specifies the priority for alert condition terms.
description: NrqlConditionPriority specifies the priority
for alert condition terms.
type: string
threshold:
type: string
threshold_duration:
type: integer
threshold_occurrences:
description: ThresholdOccurrence specifies the threshold occurrence for NRQL alert condition terms.
description: ThresholdOccurrence specifies the threshold occurrence
for NRQL alert condition terms.
type: string
type: object
type: array
type:
description: NrqlConditionType specifies the type of NRQL alert condition.
description: NrqlConditionType specifies the type of NRQL alert
condition.
type: string
valueFunction:
description: NrqlConditionValueFunction specifies the value function of NRQL alert condition.
description: NrqlConditionValueFunction specifies the value function
of NRQL alert condition.
type: string
violationTimeLimit:
description: NrqlConditionViolationTimeLimit specifies the value function of NRQL alert condition.
description: NrqlConditionViolationTimeLimit specifies the value
function of NRQL alert condition.
type: string
required:
- enabled
Expand Down
Loading

0 comments on commit 5e1bd54

Please sign in to comment.