mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 18:18:41 +00:00
[cozystack-api] Specify OpenAPI schema for apps
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
@@ -12,10 +12,10 @@ repos:
|
||||
name: Run 'make generate' in all app directories
|
||||
entry: |
|
||||
/bin/bash -c '
|
||||
for dir in ./packages/apps/*/; do
|
||||
for dir in ./packages/apps/*/ ./packages/extra/*/ ./packages/system/cozystack-api/; do
|
||||
if [ -d "$dir" ]; then
|
||||
echo "Running make generate in $dir"
|
||||
(cd "$dir" && make generate)
|
||||
make generate -C "$dir"
|
||||
fi
|
||||
done
|
||||
git diff --color=always | cat
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
| Name | Description | Value |
|
||||
| ---------------- | ----------------------------------------------------------------- | ------- |
|
||||
| `replicas` | Number of ingress-nginx replicas | `2` |
|
||||
| `externalIPs` | List of externalIPs for service. | `[]` |
|
||||
| `whitelist` | List of client networks | `[]` |
|
||||
| `clouflareProxy` | Restoring original visitor IPs when Cloudflare proxied is enabled | `false` |
|
||||
|
||||
|
||||
@@ -7,14 +7,6 @@
|
||||
"description": "Number of ingress-nginx replicas",
|
||||
"default": 2
|
||||
},
|
||||
"externalIPs": {
|
||||
"type": "array",
|
||||
"description": "List of externalIPs for service.",
|
||||
"default": "[]",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"whitelist": {
|
||||
"type": "array",
|
||||
"description": "List of client networks",
|
||||
|
||||
@@ -21,3 +21,8 @@ image-cozystack-api:
|
||||
IMAGE="$(REGISTRY)/cozystack-api:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/cozystack-api.json -o json -r)" \
|
||||
yq -i '.cozystackAPI.image = strenv(IMAGE)' values.yaml
|
||||
rm -f images/cozystack-api.json
|
||||
|
||||
generate:
|
||||
rm -rf openapi-schemas
|
||||
mkdir -p openapi-schemas
|
||||
find ../../apps ../../extra -maxdepth 2 -name values.schema.json -exec sh -c 'ln -s ../{} openapi-schemas/$$(basename $$(dirname {})).json' \;
|
||||
|
||||
1
packages/system/cozystack-api/openapi-schemas/bootbox.json
vendored
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/bootbox.json
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../extra/bootbox/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/bucket.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/bucket.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/bucket/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/clickhouse.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/clickhouse.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/clickhouse/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/etcd.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/etcd.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../extra/etcd/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/ferretdb.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/ferretdb.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/ferretdb/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/http-cache.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/http-cache.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/http-cache/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/info.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/info.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../extra/info/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/ingress.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/ingress.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../extra/ingress/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/kafka.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/kafka.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/kafka/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/kubernetes.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/kubernetes.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/kubernetes/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/monitoring.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/monitoring.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../extra/monitoring/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/mysql.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/mysql.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/mysql/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/nats.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/nats.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/nats/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/postgres.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/postgres.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/postgres/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/rabbitmq.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/rabbitmq.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/rabbitmq/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/redis.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/redis.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/redis/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/seaweedfs.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/seaweedfs.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../extra/seaweedfs/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/tcp-balancer.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/tcp-balancer.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/tcp-balancer/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/tenant.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/tenant.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/tenant/values.schema.json
|
||||
@@ -0,0 +1 @@
|
||||
../../../apps/virtual-machine/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/vm-disk.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/vm-disk.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/vm-disk/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/vm-instance.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/vm-instance.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/vm-instance/values.schema.json
|
||||
1
packages/system/cozystack-api/openapi-schemas/vpn.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/vpn.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/vpn/values.schema.json
|
||||
@@ -10,6 +10,7 @@ data:
|
||||
kind: Bucket
|
||||
singular: bucket
|
||||
plural: buckets
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/bucket.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: bucket-
|
||||
labels:
|
||||
@@ -24,6 +25,7 @@ data:
|
||||
kind: ClickHouse
|
||||
singular: clickhouse
|
||||
plural: clickhouses
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/clickhouse.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: clickhouse-
|
||||
labels:
|
||||
@@ -38,6 +40,7 @@ data:
|
||||
kind: HTTPCache
|
||||
singular: httpcache
|
||||
plural: httpcaches
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/http-cache.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: http-cache-
|
||||
labels:
|
||||
@@ -52,6 +55,7 @@ data:
|
||||
kind: NATS
|
||||
singular: nats
|
||||
plural: natses
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/nats.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: nats-
|
||||
labels:
|
||||
@@ -66,6 +70,7 @@ data:
|
||||
kind: TCPBalancer
|
||||
singular: tcpbalancer
|
||||
plural: tcpbalancers
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/tcp-balancer.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: tcp-balancer-
|
||||
labels:
|
||||
@@ -80,6 +85,7 @@ data:
|
||||
kind: VirtualMachine
|
||||
singular: virtualmachine
|
||||
plural: virtualmachines
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/virtual-machine.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: virtual-machine-
|
||||
labels:
|
||||
@@ -94,6 +100,7 @@ data:
|
||||
kind: VPN
|
||||
singular: vpn
|
||||
plural: vpns
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/vpn.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: vpn-
|
||||
labels:
|
||||
@@ -108,6 +115,7 @@ data:
|
||||
kind: MySQL
|
||||
singular: mysql
|
||||
plural: mysqls
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/mysql.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: mysql-
|
||||
labels:
|
||||
@@ -122,6 +130,7 @@ data:
|
||||
kind: Tenant
|
||||
singular: tenant
|
||||
plural: tenants
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/tenant.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: tenant-
|
||||
labels:
|
||||
@@ -136,6 +145,7 @@ data:
|
||||
kind: Kubernetes
|
||||
singular: kubernetes
|
||||
plural: kuberneteses
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/kubernetes.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: kubernetes-
|
||||
labels:
|
||||
@@ -150,6 +160,7 @@ data:
|
||||
kind: Redis
|
||||
singular: redis
|
||||
plural: redises
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/redis.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: redis-
|
||||
labels:
|
||||
@@ -164,6 +175,7 @@ data:
|
||||
kind: RabbitMQ
|
||||
singular: rabbitmq
|
||||
plural: rabbitmqs
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/rabbitmq.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: rabbitmq-
|
||||
labels:
|
||||
@@ -178,6 +190,7 @@ data:
|
||||
kind: Postgres
|
||||
singular: postgres
|
||||
plural: postgreses
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/postgres.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: postgres-
|
||||
labels:
|
||||
@@ -192,6 +205,7 @@ data:
|
||||
kind: FerretDB
|
||||
singular: ferretdb
|
||||
plural: ferretdb
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/ferretdb.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: ferretdb-
|
||||
labels:
|
||||
@@ -206,6 +220,7 @@ data:
|
||||
kind: Kafka
|
||||
singular: kafka
|
||||
plural: kafkas
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/kafka.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: kafka-
|
||||
labels:
|
||||
@@ -220,6 +235,7 @@ data:
|
||||
kind: VMDisk
|
||||
plural: vmdisks
|
||||
singular: vmdisk
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/vm-disk.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: vm-disk-
|
||||
labels:
|
||||
@@ -234,6 +250,7 @@ data:
|
||||
kind: VMInstance
|
||||
plural: vminstances
|
||||
singular: vminstance
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/vm-instance.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: vm-instance-
|
||||
labels:
|
||||
@@ -248,6 +265,7 @@ data:
|
||||
kind: Monitoring
|
||||
plural: monitorings
|
||||
singular: monitoring
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/monitoring.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: ""
|
||||
labels:
|
||||
@@ -262,6 +280,7 @@ data:
|
||||
kind: Etcd
|
||||
plural: etcds
|
||||
singular: etcd
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/etcd.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: ""
|
||||
labels:
|
||||
@@ -276,6 +295,7 @@ data:
|
||||
kind: Ingress
|
||||
plural: ingresses
|
||||
singular: ingress
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/ingress.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: ""
|
||||
labels:
|
||||
@@ -290,6 +310,7 @@ data:
|
||||
kind: SeaweedFS
|
||||
plural: seaweedfses
|
||||
singular: seaweedfs
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/seaweedfs.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: ""
|
||||
labels:
|
||||
@@ -304,6 +325,7 @@ data:
|
||||
kind: BootBox
|
||||
plural: bootboxes
|
||||
singular: bootbox
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/bootbox.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: ""
|
||||
labels:
|
||||
@@ -318,6 +340,7 @@ data:
|
||||
kind: Info
|
||||
plural: infos
|
||||
singular: info
|
||||
openAPISchema: {{ .Files.Get "openapi-schemas/info.json" | fromJson | toJson | quote }}
|
||||
release:
|
||||
prefix: ""
|
||||
labels:
|
||||
|
||||
Reference in New Issue
Block a user