-
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
9 changed files
with
361 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
1 change: 1 addition & 0 deletions
1
crd-catalog/arsenalzp/apch-operator/apacheweb.arsenal.dev/v1alpha1/apachewebs.args
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 @@ | ||
--derive=PartialEq |
206 changes: 206 additions & 0 deletions
206
crd-catalog/arsenalzp/apch-operator/apacheweb.arsenal.dev/v1alpha1/apachewebs.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,206 @@ | ||
apiVersion: "apiextensions.k8s.io/v1" | ||
kind: "CustomResourceDefinition" | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: "v0.10.0" | ||
name: "apachewebs.apacheweb.arsenal.dev" | ||
spec: | ||
group: "apacheweb.arsenal.dev" | ||
names: | ||
kind: "Apacheweb" | ||
listKind: "ApachewebList" | ||
plural: "apachewebs" | ||
singular: "apacheweb" | ||
scope: "Namespaced" | ||
versions: | ||
- additionalPrinterColumns: | ||
- jsonPath: ".spec.size" | ||
name: "Size" | ||
type: "integer" | ||
- jsonPath: ".spec.serverName" | ||
name: "Server Name" | ||
type: "string" | ||
- jsonPath: ".spec.type" | ||
name: "Type" | ||
type: "string" | ||
- jsonPath: ".spec.loadBalancer" | ||
name: "Load Balancers" | ||
type: "string" | ||
name: "v1alpha1" | ||
schema: | ||
openAPIV3Schema: | ||
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: | ||
properties: | ||
loadBalancer: | ||
properties: | ||
backEndService: | ||
type: "string" | ||
endPointsList: | ||
items: | ||
properties: | ||
ipAddress: | ||
type: "string" | ||
port: | ||
format: "int32" | ||
type: "integer" | ||
proto: | ||
type: "string" | ||
status: | ||
type: "boolean" | ||
required: | ||
- "ipAddress" | ||
- "port" | ||
- "proto" | ||
type: "object" | ||
type: "array" | ||
path: | ||
type: "string" | ||
proto: | ||
type: "string" | ||
proxyPaths: | ||
items: | ||
properties: | ||
endPointsList: | ||
items: | ||
properties: | ||
ipAddress: | ||
type: "string" | ||
port: | ||
format: "int32" | ||
type: "integer" | ||
proto: | ||
type: "string" | ||
status: | ||
type: "boolean" | ||
required: | ||
- "ipAddress" | ||
- "port" | ||
- "proto" | ||
type: "object" | ||
type: "array" | ||
path: | ||
type: "string" | ||
required: | ||
- "path" | ||
type: "object" | ||
type: "array" | ||
serverPort: | ||
default: 8080 | ||
format: "int32" | ||
minimum: 4096.0 | ||
type: "integer" | ||
required: | ||
- "serverPort" | ||
type: "object" | ||
serverName: | ||
type: "string" | ||
size: | ||
format: "int32" | ||
maximum: 5.0 | ||
minimum: 1.0 | ||
type: "integer" | ||
type: | ||
enum: | ||
- "web" | ||
- "lb" | ||
type: "string" | ||
webServer: | ||
properties: | ||
documentRoot: | ||
type: "string" | ||
serverAdmin: | ||
type: "string" | ||
serverPort: | ||
default: 8080 | ||
format: "int32" | ||
minimum: 4096.0 | ||
type: "integer" | ||
required: | ||
- "documentRoot" | ||
- "serverAdmin" | ||
- "serverPort" | ||
type: "object" | ||
required: | ||
- "serverName" | ||
- "size" | ||
- "type" | ||
type: "object" | ||
status: | ||
description: "ApachewebStatus defines the observed state of Apacheweb" | ||
properties: | ||
endPoints: | ||
items: | ||
properties: | ||
ipAddress: | ||
type: "string" | ||
port: | ||
format: "int32" | ||
type: "integer" | ||
proto: | ||
type: "string" | ||
status: | ||
type: "boolean" | ||
required: | ||
- "ipAddress" | ||
- "port" | ||
- "proto" | ||
type: "object" | ||
type: "array" | ||
proxyPaths: | ||
items: | ||
properties: | ||
endPointsList: | ||
items: | ||
properties: | ||
ipAddress: | ||
type: "string" | ||
port: | ||
format: "int32" | ||
type: "integer" | ||
proto: | ||
type: "string" | ||
status: | ||
type: "boolean" | ||
required: | ||
- "ipAddress" | ||
- "port" | ||
- "proto" | ||
type: "object" | ||
type: "array" | ||
path: | ||
type: "string" | ||
required: | ||
- "path" | ||
type: "object" | ||
type: "array" | ||
webServer: | ||
properties: | ||
documentRoot: | ||
type: "string" | ||
serverAdmin: | ||
type: "string" | ||
serverPort: | ||
default: 8080 | ||
format: "int32" | ||
minimum: 4096.0 | ||
type: "integer" | ||
required: | ||
- "documentRoot" | ||
- "serverAdmin" | ||
- "serverPort" | ||
type: "object" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod v1alpha1; |
133 changes: 133 additions & 0 deletions
133
kube-custom-resources-rs/src/apacheweb_arsenal_dev/v1alpha1/apachewebs.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,133 @@ | ||
// WARNING: generated by kopium - manual changes will be overwritten | ||
// kopium command: kopium --docs --filename=./crd-catalog/arsenalzp/apch-operator/apacheweb.arsenal.dev/v1alpha1/apachewebs.yaml --derive=PartialEq | ||
// kopium version: 0.17.2 | ||
|
||
use kube::CustomResource; | ||
use serde::{Serialize, Deserialize}; | ||
|
||
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
#[kube(group = "apacheweb.arsenal.dev", version = "v1alpha1", kind = "Apacheweb", plural = "apachewebs")] | ||
#[kube(namespaced)] | ||
#[kube(status = "ApachewebStatus")] | ||
#[kube(schema = "disabled")] | ||
pub struct ApachewebSpec { | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "loadBalancer")] | ||
pub load_balancer: Option<ApachewebLoadBalancer>, | ||
#[serde(rename = "serverName")] | ||
pub server_name: String, | ||
pub size: i32, | ||
#[serde(rename = "type")] | ||
pub r#type: ApachewebType, | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "webServer")] | ||
pub web_server: Option<ApachewebWebServer>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct ApachewebLoadBalancer { | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "backEndService")] | ||
pub back_end_service: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "endPointsList")] | ||
pub end_points_list: Option<Vec<ApachewebLoadBalancerEndPointsList>>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub path: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub proto: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "proxyPaths")] | ||
pub proxy_paths: Option<Vec<ApachewebLoadBalancerProxyPaths>>, | ||
#[serde(rename = "serverPort")] | ||
pub server_port: i32, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct ApachewebLoadBalancerEndPointsList { | ||
#[serde(rename = "ipAddress")] | ||
pub ip_address: String, | ||
pub port: i32, | ||
pub proto: String, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub status: Option<bool>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct ApachewebLoadBalancerProxyPaths { | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "endPointsList")] | ||
pub end_points_list: Option<Vec<ApachewebLoadBalancerProxyPathsEndPointsList>>, | ||
pub path: String, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct ApachewebLoadBalancerProxyPathsEndPointsList { | ||
#[serde(rename = "ipAddress")] | ||
pub ip_address: String, | ||
pub port: i32, | ||
pub proto: String, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub status: Option<bool>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub enum ApachewebType { | ||
#[serde(rename = "web")] | ||
Web, | ||
#[serde(rename = "lb")] | ||
Lb, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct ApachewebWebServer { | ||
#[serde(rename = "documentRoot")] | ||
pub document_root: String, | ||
#[serde(rename = "serverAdmin")] | ||
pub server_admin: String, | ||
#[serde(rename = "serverPort")] | ||
pub server_port: i32, | ||
} | ||
|
||
/// ApachewebStatus defines the observed state of Apacheweb | ||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct ApachewebStatus { | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "endPoints")] | ||
pub end_points: Option<Vec<ApachewebStatusEndPoints>>, | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "proxyPaths")] | ||
pub proxy_paths: Option<Vec<ApachewebStatusProxyPaths>>, | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "webServer")] | ||
pub web_server: Option<ApachewebStatusWebServer>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct ApachewebStatusEndPoints { | ||
#[serde(rename = "ipAddress")] | ||
pub ip_address: String, | ||
pub port: i32, | ||
pub proto: String, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub status: Option<bool>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct ApachewebStatusProxyPaths { | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "endPointsList")] | ||
pub end_points_list: Option<Vec<ApachewebStatusProxyPathsEndPointsList>>, | ||
pub path: String, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct ApachewebStatusProxyPathsEndPointsList { | ||
#[serde(rename = "ipAddress")] | ||
pub ip_address: String, | ||
pub port: i32, | ||
pub proto: String, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub status: Option<bool>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct ApachewebStatusWebServer { | ||
#[serde(rename = "documentRoot")] | ||
pub document_root: String, | ||
#[serde(rename = "serverAdmin")] | ||
pub server_admin: String, | ||
#[serde(rename = "serverPort")] | ||
pub server_port: i32, | ||
} | ||
|
1 change: 1 addition & 0 deletions
1
kube-custom-resources-rs/src/apacheweb_arsenal_dev/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 apachewebs; |
Oops, something went wrong.