Skip to content

Commit

Permalink
make use of questions groups
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros-k committed Mar 8, 2023
1 parent 3aca30a commit ae299d9
Show file tree
Hide file tree
Showing 15 changed files with 371 additions and 372 deletions.
Binary file modified community/ipfs/1.0.0/charts/common-1.0.0.tgz
Binary file not shown.
35 changes: 17 additions & 18 deletions community/ipfs/1.0.0/ix_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@ resources:
cpu: 4000m
memory: 8Gi

ipfs:
network:
apiPort: 30000
swarmPort: 30001
gatewayPort: 30002
hostNetwork: false
runAs:
user: 568
group: 568
storage:
data:
type: ixVolume
hostPath: ""
datasetName: data
staging:
type: ixVolume
hostPath: ""
datasetName: staging
ipfs_network:
apiPort: 30000
swarmPort: 30001
gatewayPort: 30002
hostNetwork: false
ipfs_runAs:
user: 568
group: 568
ipfs_storage:
data:
type: ixVolume
hostPath: ""
datasetName: data
staging:
type: ixVolume
hostPath: ""
datasetName: staging
253 changes: 127 additions & 126 deletions community/ipfs/1.0.0/questions.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
groups:
- name: IPFS Configuration
description: Configure IPFS
- name: User and Group Configuration
description: Configure User and Group for IPFS
- name: Network Configuration
description: Configure Network for IPFS
- name: Storage Configuration
description: Configure Storage for IPFS
- name: Resources Configuration
description: Configure Resources for IPFS

Expand All @@ -15,157 +19,154 @@ portals:
path: "$kubernetes-resource_configmap_portal_path"

questions:
- variable: ipfs
label: IPFS Configuration
group: IPFS Configuration

- variable: runAs
label: User and Group Configuration
group: User and Group Configuration
schema:
type: dict
attrs:
- variable: user
label: User ID
description: The user id that IPFS will run as.
schema:
type: int
min: 1
default: 568
required: true
- variable: group
label: Group ID
description: The group id that IPFS will run as.
schema:
type: int
min: 1
default: 568
required: true

- variable: network
label: Network
group: Network Configuration
schema:
type: dict
attrs:
- variable: apiPort
label: API Port
description: The port for the IPFS API (And WebUI).
schema:
type: int
default: 30000
min: 9000
max: 65535
required: true
- variable: swarmPort
label: Swarm Port
description: The port for the IPFS Swarm. Both TCP and UDP
schema:
type: int
default: 30001
min: 9000
max: 65535
required: true
- variable: gatewayPort
label: Gateway Port
description: The port for the IPFS Gateway.
schema:
type: int
default: 30002
min: 9000
max: 65535
required: true
- variable: hostNetwork
label: Host Network
description: |
Bind to the host network. It's recommended to keep this disabled.
schema:
type: boolean
default: false

- variable: runAs
label: User and Group Configuration
- variable: storage
label: Storage Configuration
group: Storage Configuration
schema:
type: dict
attrs:
- variable: data
label: IPFS Data Storage
description: The path to store IPFS data.
schema:
type: dict
attrs:
- variable: user
label: User ID
description: The user id that IPFS will run as.
- variable: type
label: Type
schema:
type: int
min: 1
default: 568
type: string
required: true
- variable: group
label: Group ID
description: The group id that IPFS will run as.
default: ixVolume
enum:
- value: hostPath
description: Host Path
- value: ixVolume
description: ixVolume
- variable: datasetName
label: Dataset Name
schema:
type: int
min: 1
default: 568
type: string
show_if: [["type", "=", "ixVolume"]]
required: true

- variable: network
label: Network
hidden: true
immutable: true
default: data
$ref:
- "normalize/ixVolume"
- variable: hostPath
label: Host Path
schema:
type: hostpath
show_if: [["type", "=", "hostPath"]]
immutable: true
required: true
- variable: staging
label: IPFS Staging Storage
description: The path to store IPFS staging storage.
schema:
type: dict
attrs:
- variable: apiPort
label: API Port
description: The port for the IPFS API (And WebUI).
- variable: type
label: Type
schema:
type: int
default: 30000
min: 9000
max: 65535
type: string
required: true
- variable: swarmPort
label: Swarm Port
description: The port for the IPFS Swarm. Both TCP and UDP
default: ixVolume
enum:
- value: hostPath
description: Host Path
- value: ixVolume
description: ixVolume
- variable: datasetName
label: Dataset Name
schema:
type: int
default: 30001
min: 9000
max: 65535
type: string
show_if: [["type", "=", "ixVolume"]]
required: true
- variable: gatewayPort
label: Gateway Port
description: The port for the IPFS Gateway.
hidden: true
immutable: true
default: staging
$ref:
- "normalize/ixVolume"
- variable: hostPath
label: Host Path
schema:
type: int
default: 30002
min: 9000
max: 65535
type: hostpath
show_if: [["type", "=", "hostPath"]]
immutable: true
required: true
- variable: hostNetwork
label: Host Network
description: |
Bind to the host network. It's recommended to keep this disabled.
schema:
type: boolean
default: false
- variable: storage
label: Storage Configuration
schema:
type: dict
attrs:
- variable: data
label: IPFS Data Storage
description: The path to store IPFS data.
schema:
type: dict
attrs:
- variable: type
label: Type
schema:
type: string
required: true
default: ixVolume
enum:
- value: hostPath
description: Host Path
- value: ixVolume
description: ixVolume
- variable: datasetName
label: Dataset Name
schema:
type: string
show_if: [["type", "=", "ixVolume"]]
required: true
hidden: true
immutable: true
default: data
$ref:
- "normalize/ixVolume"
- variable: hostPath
label: Host Path
schema:
type: hostpath
show_if: [["type", "=", "hostPath"]]
immutable: true
required: true
- variable: staging
label: IPFS Staging Storage
description: The path to store IPFS staging storage.
schema:
type: dict
attrs:
- variable: type
label: Type
schema:
type: string
required: true
default: ixVolume
enum:
- value: hostPath
description: Host Path
- value: ixVolume
description: ixVolume
- variable: datasetName
label: Dataset Name
schema:
type: string
show_if: [["type", "=", "ixVolume"]]
required: true
hidden: true
immutable: true
default: staging
$ref:
- "normalize/ixVolume"
- variable: hostPath
label: Host Path
schema:
type: hostpath
show_if: [["type", "=", "hostPath"]]
immutable: true
required: true

- variable: resources
label: Resources Configuration
group: Resources Configuration
schema:
type: dict
attrs:

- variable: limits
label: Limits
schema:
Expand Down
20 changes: 10 additions & 10 deletions community/ipfs/1.0.0/templates/_configuration.tpl
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{{- define "ipfs.configuration" -}}
{{/* Default Swarm Addresses https://github.com/ipfs/kubo/blob/master/docs/config.md#addressesswarm */}}
{{ $swarmAddressesList := (list
(printf "/ip4/0.0.0.0/tcp/%v" .Values.ipfs.network.swarmPort)
(printf "/ip6/::/tcp/%v" .Values.ipfs.network.swarmPort)
(printf "/ip4/0.0.0.0/udp/%v/quic" .Values.ipfs.network.swarmPort)
(printf "/ip4/0.0.0.0/udp/%v/quic-v1" .Values.ipfs.network.swarmPort)
(printf "/ip4/0.0.0.0/udp/%v/quic-v1/webtransport" .Values.ipfs.network.swarmPort)
(printf "/ip6/::/udp/%v/quic" .Values.ipfs.network.swarmPort)
(printf "/ip6/::/udp/%v/quic-v1" .Values.ipfs.network.swarmPort)
(printf "/ip6/::/udp/%v/quic-v1/webtransport" .Values.ipfs.network.swarmPort)
(printf "/ip4/0.0.0.0/tcp/%v" .Values.ipfs_network.swarmPort)
(printf "/ip6/::/tcp/%v" .Values.ipfs_network.swarmPort)
(printf "/ip4/0.0.0.0/udp/%v/quic" .Values.ipfs_network.swarmPort)
(printf "/ip4/0.0.0.0/udp/%v/quic-v1" .Values.ipfs_network.swarmPort)
(printf "/ip4/0.0.0.0/udp/%v/quic-v1/webtransport" .Values.ipfs_network.swarmPort)
(printf "/ip6/::/udp/%v/quic" .Values.ipfs_network.swarmPort)
(printf "/ip6/::/udp/%v/quic-v1" .Values.ipfs_network.swarmPort)
(printf "/ip6/::/udp/%v/quic-v1/webtransport" .Values.ipfs_network.swarmPort)
) }}

{{ $swarmAddresses := printf "[ \"%s\" ]" (join "\", \"" $swarmAddressesList) }}

{{/* Default API Address https://github.com/ipfs/kubo/blob/master/docs/config.md#addressesapi */}}
{{ $apiAddresses := printf "/ip4/127.0.0.1/tcp/%v" .Values.ipfs.network.apiPort }}
{{ $apiAddresses := printf "/ip4/127.0.0.1/tcp/%v" .Values.ipfs_network.apiPort }}
{{/* Default Gateway Address https://github.com/ipfs/kubo/blob/master/docs/config.md#addressesgateway */}}
{{ $gatewayAddresses := printf "/ip4/127.0.0.1/tcp/%v" .Values.ipfs.network.gatewayPort }}
{{ $gatewayAddresses := printf "/ip4/127.0.0.1/tcp/%v" .Values.ipfs_network.gatewayPort }}
{{ $allowOrigins := "[ \"*\" ]" }}
{{ $allowMethods := "[ \"PUT\", \"POST\" ]" }}

Expand Down
Loading

0 comments on commit ae299d9

Please sign in to comment.