Skip to content

Commit ce3106a

Browse files
authored
Add kubedb-ui-presets chart (#407)
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent c35e887 commit ce3106a

18 files changed

Lines changed: 495 additions & 49 deletions

File tree

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
Copyright AppsCode Inc. and Contributors
3+
4+
Licensed under the AppsCode Community License 1.0.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1alpha1
18+
19+
import (
20+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21+
)
22+
23+
const (
24+
ResourceKindKubedbUiPresets = "KubedbUiPresets"
25+
ResourceKubedbUiPresets = "kubedbuipresets"
26+
ResourceKubedbUiPresetss = "kubedbuipresetss"
27+
)
28+
29+
// KubedbUiPresets defines the schama for KubedbUiPresets Installer.
30+
31+
// +genclient
32+
// +genclient:skipVerbs=updateStatus
33+
// +k8s:openapi-gen=true
34+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
35+
36+
// +kubebuilder:object:root=true
37+
// +kubebuilder:resource:path=kubedbuipresetss,singular=kubedbuipresets,categories={kubeops,appscode}
38+
type KubedbUiPresets struct {
39+
metav1.TypeMeta `json:",inline,omitempty"`
40+
metav1.ObjectMeta `json:"metadata,omitempty"`
41+
Spec KubedbUiPresetsSpec `json:"spec,omitempty"`
42+
}
43+
44+
type KubedbUiPresetsSpec struct {
45+
CAPI CapiPresetsSpec `json:"capi"`
46+
}
47+
48+
type CapiPresetsSpec struct {
49+
// +optional
50+
Provider string `json:"provider"`
51+
Namespace string `json:"namespace"`
52+
ClusterName string `json:"clusterName"`
53+
}
54+
55+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
56+
57+
// KubedbUiPresetsList is a list of KubedbUiPresetss
58+
type KubedbUiPresetsList struct {
59+
metav1.TypeMeta `json:",inline"`
60+
metav1.ListMeta `json:"metadata,omitempty"`
61+
// Items is a list of KubedbUiPresets CRD objects
62+
Items []KubedbUiPresets `json:"items,omitempty"`
63+
}

apis/installer/v1alpha1/register.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
8888
&IngressNginxList{},
8989
&KubedbUi{},
9090
&KubedbUiList{},
91+
&KubedbUiPresets{},
92+
&KubedbUiPresetsList{},
9193
&LicenseProxyserver{},
9294
&LicenseProxyserverList{},
9395
&LicenseProxyserverManager{},

apis/installer/v1alpha1/types_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func TestDefaultValues(t *testing.T) {
4343
sc.TestCase{Obj: v1alpha1.GrafanaSpec{}},
4444
sc.TestCase{Obj: v1alpha1.InboxUiSpec{}},
4545
sc.TestCase{Obj: v1alpha1.KubedbUiSpec{}},
46+
sc.TestCase{Obj: v1alpha1.KubedbUiPresetsSpec{}},
4647
sc.TestCase{Obj: v1alpha1.LicenseProxyserverSpec{}},
4748
sc.TestCase{Obj: v1alpha1.LicenseProxyserverManagerSpec{}},
4849
sc.TestCase{Obj: v1alpha1.MarketplaceUiSpec{}},

apis/installer/v1alpha1/zz_generated.deepcopy.go

Lines changed: 89 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v2
2+
name: kubedb-ui-presets
3+
description: KubeDB UI Presets
4+
type: application
5+
version: v2024.6.18
6+
appVersion: v2024.6.18
7+
home: https://github.com/bytebuilders
8+
icon: https://cdn.appscode.com/images/products/bytebuilders/icons/android-icon-192x192.png
9+
sources:
10+
- https://github.com/bytebuilders
11+
maintainers:
12+
- name: appscode
13+
email: support@appscode.com

charts/kubedb-ui-presets/README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# KubeDB UI Presets
2+
3+
[KubeDB UI Presets by AppsCode](https://github.com/appscode-cloud) - KubeDB UI Presets
4+
5+
## TL;DR;
6+
7+
```bash
8+
$ helm repo add appscode https://charts.appscode.com/stable
9+
$ helm repo update
10+
$ helm search repo appscode/kubedb-ui-presets --version=v2024.6.18
11+
$ helm upgrade -i kubedb-ui-presets appscode/kubedb-ui-presets -n kubeops --create-namespace --version=v2024.6.18
12+
```
13+
14+
## Introduction
15+
16+
This chart deploys KubeDB UI Presets on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
17+
18+
## Prerequisites
19+
20+
- Kubernetes 1.21+
21+
22+
## Installing the Chart
23+
24+
To install/upgrade the chart with the release name `kubedb-ui-presets`:
25+
26+
```bash
27+
$ helm upgrade -i kubedb-ui-presets appscode/kubedb-ui-presets -n kubeops --create-namespace --version=v2024.6.18
28+
```
29+
30+
The command deploys KubeDB UI Presets on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
31+
32+
> **Tip**: List all releases using `helm list`
33+
34+
## Uninstalling the Chart
35+
36+
To uninstall the `kubedb-ui-presets`:
37+
38+
```bash
39+
$ helm uninstall kubedb-ui-presets -n kubeops
40+
```
41+
42+
The command removes all the Kubernetes components associated with the chart and deletes the release.
43+
44+
## Configuration
45+
46+
The following table lists the configurable parameters of the `kubedb-ui-presets` chart and their default values.
47+
48+
| Parameter | Description | Default |
49+
|------------------|-------------|-----------------|
50+
| capi.provider | | <code>""</code> |
51+
| capi.namespace | | <code>""</code> |
52+
| capi.clusterName | | <code>""</code> |
53+
54+
55+
Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:
56+
57+
```bash
58+
$ helm upgrade -i kubedb-ui-presets appscode/kubedb-ui-presets -n kubeops --create-namespace --version=v2024.6.18 --set -- generate from values file --
59+
```
60+
61+
Alternatively, a YAML file that specifies the values for the parameters can be provided while
62+
installing the chart. For example:
63+
64+
```bash
65+
$ helm upgrade -i kubedb-ui-presets appscode/kubedb-ui-presets -n kubeops --create-namespace --version=v2024.6.18 --values values.yaml
66+
```
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: clusterchartpresets.charts.x-helm.dev
5+
spec:
6+
group: charts.x-helm.dev
7+
names:
8+
kind: ClusterChartPreset
9+
listKind: ClusterChartPresetList
10+
plural: clusterchartpresets
11+
singular: clusterchartpreset
12+
scope: Cluster
13+
versions:
14+
- name: v1alpha1
15+
schema:
16+
openAPIV3Schema:
17+
description: ClusterChartPreset is the Schema for the clusterchartpresets
18+
API
19+
properties:
20+
apiVersion:
21+
description: 'APIVersion defines the versioned schema of this representation
22+
of an object. Servers should convert recognized schemas to the latest
23+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
24+
type: string
25+
kind:
26+
description: 'Kind is a string value representing the REST resource this
27+
object represents. Servers may infer this from the endpoint the client
28+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
29+
type: string
30+
metadata:
31+
type: object
32+
spec:
33+
description: ClusterChartPresetSpec defines the desired state of ClusterChartPreset
34+
properties:
35+
values:
36+
type: object
37+
x-kubernetes-preserve-unknown-fields: true
38+
type: object
39+
type: object
40+
served: true
41+
storage: true
42+
subresources:
43+
status: {}

charts/kubedb-ui-presets/doc.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
project:
2+
name: KubeDB UI Presets by AppsCode
3+
shortName: KubeDB UI Presets
4+
url: https://github.com/appscode-cloud
5+
description: KubeDB UI Presets
6+
app: KubeDB UI Presets
7+
repository:
8+
url: https://charts.appscode.com/stable
9+
name: appscode
10+
chart:
11+
name: kubedb-ui-presets
12+
values: -- generate from values file --
13+
valuesExample: -- generate from values file --
14+
prerequisites:
15+
- Kubernetes 1.21+
16+
release:
17+
name: kubedb-ui-presets
18+
namespace: kubeops
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
List all cluster presets by running these commands:
2+
3+
kubectl get clusterpresets

0 commit comments

Comments
 (0)