-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`operator-sdk create api --group datadoghq --kind DatadogPodAutoscaler --version v2alpha1`
- Loading branch information
Showing
10 changed files
with
247 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Unless explicitly stated otherwise all files in this repository are licensed | ||
// under the Apache License Version 2.0. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
// Copyright 2016-present Datadog, Inc. | ||
|
||
package v2alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! | ||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. | ||
|
||
// DatadogPodAutoscalerSpec defines the desired state of DatadogPodAutoscaler | ||
type DatadogPodAutoscalerSpec struct { | ||
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster | ||
// Important: Run "make" to regenerate code after modifying this file | ||
|
||
// Foo is an example field of DatadogPodAutoscaler. Edit datadogpodautoscaler_types.go to remove/update | ||
Foo string `json:"foo,omitempty"` | ||
} | ||
|
||
// DatadogPodAutoscalerStatus defines the observed state of DatadogPodAutoscaler | ||
type DatadogPodAutoscalerStatus struct { | ||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster | ||
// Important: Run "make" to regenerate code after modifying this file | ||
} | ||
|
||
// +kubebuilder:object:root=true | ||
// +kubebuilder:subresource:status | ||
|
||
// DatadogPodAutoscaler is the Schema for the datadogpodautoscalers API | ||
type DatadogPodAutoscaler struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec DatadogPodAutoscalerSpec `json:"spec,omitempty"` | ||
Status DatadogPodAutoscalerStatus `json:"status,omitempty"` | ||
} | ||
|
||
// +kubebuilder:object:root=true | ||
|
||
// DatadogPodAutoscalerList contains a list of DatadogPodAutoscaler | ||
type DatadogPodAutoscalerList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []DatadogPodAutoscaler `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&DatadogPodAutoscaler{}, &DatadogPodAutoscalerList{}) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
config/crd/bases/v1/datadoghq.com_datadogpodautoscalers_v2alpha1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"additionalProperties": false, | ||
"description": "DatadogPodAutoscaler is the Schema for the datadogpodautoscalers API", | ||
"properties": { | ||
"apiVersion": { | ||
"description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", | ||
"type": "string" | ||
}, | ||
"metadata": { | ||
"type": "object" | ||
}, | ||
"spec": { | ||
"additionalProperties": false, | ||
"description": "DatadogPodAutoscalerSpec defines the desired state of DatadogPodAutoscaler", | ||
"properties": { | ||
"foo": { | ||
"description": "Foo is an example field of DatadogPodAutoscaler. Edit datadogpodautoscaler_types.go to remove/update", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"status": { | ||
"description": "DatadogPodAutoscalerStatus defines the observed state of DatadogPodAutoscaler", | ||
"type": "object" | ||
} | ||
}, | ||
"type": "object" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: datadoghq.com/v2alpha1 | ||
kind: DatadogPodAutoscaler | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: datadog-operator | ||
app.kubernetes.io/managed-by: kustomize | ||
name: datadogpodautoscaler-sample | ||
spec: | ||
# TODO(user): Add fields here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters