Skip to content

Commit

Permalink
enhance: add charts and support webhook dry run after v0.3.0 (#180)
Browse files Browse the repository at this point in the history
* init charts

* bump 0.3.0 charts and add ChartsLint ci
  • Loading branch information
Eikykun committed Mar 29, 2024
1 parent f5921a3 commit 8cbd893
Show file tree
Hide file tree
Showing 17 changed files with 7,237 additions and 5 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,27 @@ jobs:
fetch-depth: 0
- uses: apache/skywalking-eyes@main

ChartsLint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.12.1

- name: Setup Chart Linting
id: lint
uses: helm/chart-testing-action@v2.6.0

- name: Helm Lint
run: helm lint ./charts
- name: Helm Template
run: helm template test ./charts
# The TruffleHog OSS Github Action can be used to scan a range of commits for leaked credentials. The action will fail if any results are found.
# More see: https://github.com/marketplace/actions/trufflehog-oss

Expand Down
1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ header:
- '.dist/**'
- '.husky/**'
- 'hack/**'
- 'charts/**'
- 'LICENSE'
- 'OWNERS_ALIASES'
- 'SECURITY_CONTACTS'
Expand Down
8 changes: 8 additions & 0 deletions charts/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
name: operating
description: Helm chart for KusionStack Operating
version: 0.3.0
appVersion: 0.3.0
home: https://KusionStack.io
sources:
- https://github.com/KusionStack/operating
Empty file added charts/README.md
Empty file.
21 changes: 21 additions & 0 deletions charts/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

ShardingConfig options are enabled.

Default values:
```
sharding:
enabled: false # Apply a default ShardingConfig
isDemo: false # Create some demo namespace
replicas: 5 # StatefulSet Replicas
size: 2 # Sharding Size
```

Install the latest ControllerMesh.
$helm install ctrlmesh kusionstack/ctrlmesh --version 0.1.2

If ControllerMesh is already installed, you can enable ShardingConfig with
$helm install operating kusionstack/operating --version 0.3.0 --set sharding.enabled=true


KusionStack Operating v0.3.0 installed successfully.
Welcome! ^_^
598 changes: 598 additions & 0 deletions charts/templates/crd/apps.kusionstack.io_collasets.yaml

Large diffs are not rendered by default.

5,486 changes: 5,486 additions & 0 deletions charts/templates/crd/apps.kusionstack.io_poddecorations.yaml

Large diffs are not rendered by default.

443 changes: 443 additions & 0 deletions charts/templates/crd/apps.kusionstack.io_podtransitionrules.yaml

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions charts/templates/crd/apps.kusionstack.io_resourcecontexts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: resourcecontexts.apps.kusionstack.io
spec:
group: apps.kusionstack.io
names:
kind: ResourceContext
listKind: ResourceContextList
plural: resourcecontexts
shortNames:
- rc
singular: resourcecontext
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: ResourceContext is the Schema for the resourcecontext API
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:
description: ResourceContextSpec defines the desired state of ResourceContext
properties:
contexts:
items:
properties:
data:
additionalProperties:
type: string
type: object
id:
type: integer
required:
- id
type: object
type: array
type: object
type: object
served: true
storage: true
107 changes: 107 additions & 0 deletions charts/templates/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{{- if .Values.namespaceEnabled -}}
apiVersion: v1
kind: Namespace
metadata:
labels:
{{- toYaml .Values.commonLabels | nindent 4 }}
control-plane: {{ .Values.controlPlane }}
name: {{ .Values.namespace }}
{{- end }}

{{- if .Values.sharding.isDemo }}
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0a
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0b
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0c
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0d
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0e
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0f
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0g
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0o
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0p
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0q
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0r
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0s
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0t
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0u
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0v
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0w
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0x
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0y
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-0z
{{- end }}
Loading

0 comments on commit 8cbd893

Please sign in to comment.