Skip to content

Commit

Permalink
Merge pull request #7 from KusionStack/operation-0.1.0
Browse files Browse the repository at this point in the history
operating 0.1.0-beta.1
  • Loading branch information
Eikykun authored Sep 21, 2023
2 parents aa0076a + 9436cb7 commit af11337
Show file tree
Hide file tree
Showing 25 changed files with 1,574 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/operating
2 changes: 1 addition & 1 deletion charts/sample-operator
16 changes: 16 additions & 0 deletions versions/operating/0.1.0-beta.1/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
name: operating
description: Helm chart for operating components
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0-beta.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: 0.1.0-beta.1

home: https://KusionStack.io
sources:
- https://github.com/KusionStack/operating
File renamed without changes.
2 changes: 2 additions & 0 deletions versions/operating/0.1.0-beta.1/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
KusionStack Operating installed.
Welcome! ^_^
62 changes: 62 additions & 0 deletions versions/operating/0.1.0-beta.1/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "myctrlmesh.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "myctrlmesh.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "myctrlmesh.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "myctrlmesh.labels" -}}
helm.sh/chart: {{ include "myctrlmesh.chart" . }}
{{ include "myctrlmesh.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "myctrlmesh.selectorLabels" -}}
app.kubernetes.io/name: {{ include "myctrlmesh.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "myctrlmesh.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "myctrlmesh.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

Large diffs are not rendered by default.

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
Loading

0 comments on commit af11337

Please sign in to comment.