-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sebastian Hoß <[email protected]>
- Loading branch information
Showing
7 changed files
with
142 additions
and
0 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
73 changes: 73 additions & 0 deletions
73
.../change-metrics/monocle-operator/monocle.monocle.change-metrics.io/v1alpha1/monocles.yaml
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,73 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.10.0 | ||
name: monocles.monocle.monocle.change-metrics.io | ||
spec: | ||
group: monocle.monocle.change-metrics.io | ||
names: | ||
kind: Monocle | ||
listKind: MonocleList | ||
plural: monocles | ||
singular: monocle | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: Monocle is the Schema for the monocles 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' | ||
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' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: MonocleSpec defines the desired state of Monocle | ||
properties: | ||
image: | ||
default: quay.io/change-metrics/monocle:1.9.0 | ||
description: Monocle container image | ||
type: string | ||
publicURL: | ||
description: Public URL to access the Monocle API | ||
pattern: ^https?:\/\/.+$ | ||
type: string | ||
route: | ||
description: If set a Route (Openshift) resource will be spawned | ||
properties: | ||
host: | ||
description: Hostname to use for setting the Route | ||
type: string | ||
labels: | ||
additionalProperties: | ||
type: string | ||
description: Labels to add to the Route resource | ||
type: object | ||
type: object | ||
storageClassName: | ||
description: Storage class name when creating the PVC | ||
type: string | ||
storageSize: | ||
description: Initial Storage Size for the database storage | ||
type: string | ||
type: object | ||
status: | ||
description: MonocleStatus defines the observed state of Monocle | ||
properties: | ||
monocle-api: | ||
type: string | ||
monocle-crawler: | ||
type: string | ||
monocle-elastic: | ||
type: string | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
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
1 change: 1 addition & 0 deletions
1
kube-custom-resources-rs/src/monocle_monocle_change_metrics_io_v1alpha1/mod.rs
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 @@ | ||
pub mod monocles; |
54 changes: 54 additions & 0 deletions
54
kube-custom-resources-rs/src/monocle_monocle_change_metrics_io_v1alpha1/monocles.rs
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,54 @@ | ||
// WARNING: generated by kopium - manual changes will be overwritten | ||
// kopium command: kopium --docs --filename ./crd-catalog/change-metrics/monocle-operator/monocle.monocle.change-metrics.io/v1alpha1/monocles.yaml | ||
// kopium version: 0.16.1 | ||
|
||
use kube::CustomResource; | ||
use serde::{Serialize, Deserialize}; | ||
use std::collections::BTreeMap; | ||
|
||
/// MonocleSpec defines the desired state of Monocle | ||
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug)] | ||
#[kube(group = "monocle.monocle.change-metrics.io", version = "v1alpha1", kind = "Monocle", plural = "monocles")] | ||
#[kube(namespaced)] | ||
#[kube(status = "MonocleStatus")] | ||
#[kube(schema = "disabled")] | ||
pub struct MonocleSpec { | ||
/// Monocle container image | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub image: Option<String>, | ||
/// Public URL to access the Monocle API | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "publicURL")] | ||
pub public_url: Option<String>, | ||
/// If set a Route (Openshift) resource will be spawned | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub route: Option<MonocleRoute>, | ||
/// Storage class name when creating the PVC | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "storageClassName")] | ||
pub storage_class_name: Option<String>, | ||
/// Initial Storage Size for the database storage | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "storageSize")] | ||
pub storage_size: Option<String>, | ||
} | ||
|
||
/// If set a Route (Openshift) resource will be spawned | ||
#[derive(Serialize, Deserialize, Clone, Debug)] | ||
pub struct MonocleRoute { | ||
/// Hostname to use for setting the Route | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub host: Option<String>, | ||
/// Labels to add to the Route resource | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub labels: Option<BTreeMap<String, String>>, | ||
} | ||
|
||
/// MonocleStatus defines the observed state of Monocle | ||
#[derive(Serialize, Deserialize, Clone, Debug)] | ||
pub struct MonocleStatus { | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "monocle-api")] | ||
pub monocle_api: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "monocle-crawler")] | ||
pub monocle_crawler: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "monocle-elastic")] | ||
pub monocle_elastic: Option<String>, | ||
} | ||
|