Skip to content

Commit

Permalink
arsenalzp/apch-operator
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Hoß <[email protected]>
  • Loading branch information
sebhoss committed Apr 5, 2024
1 parent 27b9430 commit 5dcf7d7
Show file tree
Hide file tree
Showing 9 changed files with 361 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ Files: crd-catalog/argoproj-labs/argocd-operator/*
Copyright: The argoproj-labs/argocd-operator Authors
License: Apache-2.0

Files: crd-catalog/arsenalzp/apch-operator/*
Copyright: The arsenalzp/apch-operator Authors
License: Apache-2.0

Files: crd-catalog/atlasmap/atlasmap-operator/*
Copyright: The atlasmap/atlasmap-operator Authors
License: Apache-2.0
Expand Down
7 changes: 7 additions & 0 deletions code-generator/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,13 @@ pub const CRD_V1_SOURCES: &'static [UpstreamSource] = &[
"https://github.com/argoproj-labs/argocd-operator/blob/master/config/crd/bases/argoproj.io_argocds.yaml",
],
},
UpstreamSource {
project_name: "arsenalzp/apch-operator",
license: APACHE_V2,
urls: &[
"https://github.com/arsenalzp/apch-operator/blob/master/config/crd/bases/apacheweb.arsenal.dev_apachewebs.yaml",
],
},
UpstreamSource {
project_name: "atlasmap/atlasmap-operator",
license: APACHE_V2,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--derive=PartialEq
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: {}
1 change: 1 addition & 0 deletions kube-custom-resources-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ actions_summerwind_dev = []
addons_cluster_x_k8s_io = []
agent_k8s_elastic_co = []
anywhere_eks_amazonaws_com = []
apacheweb_arsenal_dev = []
api_clever_cloud_com = []
api_kubemod_io = []
apicodegen_apimatic_io = []
Expand Down
1 change: 1 addition & 0 deletions kube-custom-resources-rs/src/apacheweb_arsenal_dev/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod v1alpha1;
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,
}

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod apachewebs;
Loading

0 comments on commit 5dcf7d7

Please sign in to comment.