Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework ui-presets charts #206

Merged
merged 2 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions apis/installer/v1alpha1/capi_ui_presets_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)

const (
Expand All @@ -39,9 +38,26 @@ const (
type CapiUiPresets struct {
metav1.TypeMeta `json:",inline,omitempty"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec runtime.RawExtension `json:"spec,omitempty"`
Spec CapiUiPresetsSpec `json:"spec,omitempty"`
}

type CapiUiPresetsSpec struct {
// +optional
Provider CAPIProvider `json:"provider"`
Namespace string `json:"namespace"`
ClusterName string `json:"clusterName"`
}

// +kubebuilder:validation:Enum=capa;capg;capz
type CAPIProvider string

const (
CAPIProviderDisabled CAPIProvider = ""
CAPIProviderCAPA CAPIProvider = "capa"
CAPIProviderCAPG CAPIProvider = "capg"
CAPIProviderCAPZ CAPIProvider = "capz"
)

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// CapiUiPresetsList is a list of CapiUiPresetss
Expand Down
17 changes: 16 additions & 1 deletion apis/installer/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions charts/ace/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ dependencies:
- name: platform-api
repository: file://../platform-api
version: v2023.03.23
- name: platform-links
repository: file://../platform-links
version: v2023.03.23
- name: billing
repository: file://../billing
version: v2023.03.23
Expand All @@ -44,5 +47,5 @@ dependencies:
- name: nats
repository: https://nats-io.github.io/k8s/helm/charts/
version: 0.19.12
digest: sha256:5c1ead17ecffea3af24f7ee32e4f5904c79b3aa0c541fd34cf6c9220766d7bc4
generated: "2023-07-07T19:00:09.324582-07:00"
digest: sha256:b0006c87ed8916d57e6fe79ca492ca2301b4f938d00990f653ca63080cf0ad9c
generated: "2023-09-06T04:54:29.719092-07:00"
16 changes: 16 additions & 0 deletions charts/ace/crds/cloud.bytebuilders.dev_credentials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ spec:
kind: Credential
listKind: CredentialList
plural: credentials
shortNames:
- cred
singular: credential
scope: Cluster
versions:
Expand Down Expand Up @@ -133,6 +135,19 @@ spec:
- apiKey
- projectID
type: object
rancher:
properties:
accessKeyID:
type: string
endpoint:
type: string
secretAccessKey:
type: string
required:
- accessKeyID
- endpoint
- secretAccessKey
type: object
scaleway:
properties:
organization:
Expand Down Expand Up @@ -175,6 +190,7 @@ spec:
- GoogleOAuth
- Linode
- Packet
- Rancher
- Scaleway
- Vultr
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ spec:
kind: ClusterAuthInfoTemplate
listKind: ClusterAuthInfoTemplateList
plural: clusterauthinfotemplates
shortNames:
- cauth
singular: clusterauthinfotemplate
scope: Cluster
versions:
Expand Down
2 changes: 2 additions & 0 deletions charts/ace/crds/cluster.bytebuilders.dev_clusterinfos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ spec:
kind: ClusterInfo
listKind: ClusterInfoList
plural: clusterinfos
shortNames:
- cinfo
singular: clusterinfo
scope: Cluster
versions:
Expand Down
14 changes: 14 additions & 0 deletions charts/ace/crds/cluster.bytebuilders.dev_clusteruserauths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ spec:
kind: ClusterUserAuth
listKind: ClusterUserAuthList
plural: clusteruserauths
shortNames:
- uauth
singular: clusteruserauth
scope: Cluster
versions:
Expand Down Expand Up @@ -92,6 +94,18 @@ spec:
type: string
clusterUID:
type: string
credentialName:
type: string
googleCloud:
properties:
projectID:
type: string
serviceAccount:
type: string
required:
- projectID
- serviceAccount
type: object
googleOAuth:
properties:
accessToken:
Expand Down
2 changes: 1 addition & 1 deletion charts/capi-ui-presets/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: capi-ui-presets
description: ACE UI Presets for CAPI by AppsCode
description: ACE UI Presets for CAPI Cluster by AppsCode
type: application
version: v2023.03.23
appVersion: v2023.03.23
Expand Down
22 changes: 22 additions & 0 deletions charts/capi-ui-presets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,26 @@ $ helm uninstall capi-ui-presets -n kubeops

The command removes all the Kubernetes components associated with the chart and deletes the release.

## Configuration

The following table lists the configurable parameters of the `capi-ui-presets` chart and their default values.

| Parameter | Description | Default |
|------------------|-------------|-----------------|
| capi.provider | | <code>""</code> |
| capi.namespace | | <code>""</code> |
| capi.clusterName | | <code>""</code> |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:

```bash
$ helm upgrade -i capi-ui-presets appscode/capi-ui-presets -n kubeops --create-namespace --version=v2023.03.23 --set -- generate from values file --
```

Alternatively, a YAML file that specifies the values for the parameters can be provided while
installing the chart. For example:

```bash
$ helm upgrade -i capi-ui-presets appscode/capi-ui-presets -n kubeops --create-namespace --version=v2023.03.23 --values values.yaml
```
116 changes: 0 additions & 116 deletions charts/capi-ui-presets/crds/charts.x-helm.dev_chartpresets.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,79 +33,6 @@ spec:
spec:
description: ClusterChartPresetSpec defines the desired state of ClusterChartPreset
properties:
displayName:
type: string
usePresets:
items:
description: TypedLocalObjectReference contains enough information
to let you locate the typed referenced object inside the same
namespace.
properties:
apiGroup:
description: APIGroup is the group for the resource being referenced.
If APIGroup is not specified, the specified Kind must be in
the core API group. For any other third-party types, APIGroup
is required.
type: string
kind:
description: Kind is the type of resource being referenced
type: string
name:
description: Name is the name of resource being referenced
type: string
selector:
description: A label selector is a label query over a set of
resources. The result of matchLabels and matchExpressions
are ANDed. An empty label selector matches all objects. A
null label selector matches no objects.
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that relates
the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn,
Exists and DoesNotExist.
type: string
values:
description: values is an array of string values.
If the operator is In or NotIn, the values array
must be non-empty. If the operator is Exists or
DoesNotExist, the values array must be empty. This
array is replaced during a strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs.
A single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is
"key", the operator is "In", and the values array contains
only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
required:
- kind
type: object
x-kubernetes-map-type: atomic
type: array
values:
type: object
x-kubernetes-preserve-unknown-fields: true
Expand Down
Loading
Loading