From 7adfaae76fbb69dc1b5e390cb2942fa18ae49a8c Mon Sep 17 00:00:00 2001 From: Chaer Date: Wed, 27 Sep 2023 15:46:35 +0800 Subject: [PATCH] release operating-0.1.0 --- charts/operating | 2 +- versions/operating/0.1.0/Chart.yaml | 4 +- .../crd/apps.kusionstack.io_collasets.yaml | 14 +++++ ...ps.kusionstack.io_podtransitionrules.yaml} | 28 ++++----- .../operating/0.1.0/templates/deployment.yaml | 5 -- .../operating/0.1.0/templates/rbac/rbac.yaml | 6 +- .../0.1.0/templates/webhook/webhook.yaml | 59 ++++++++++++++++--- versions/operating/0.1.0/values.yaml | 2 +- 8 files changed, 87 insertions(+), 33 deletions(-) rename versions/operating/0.1.0/templates/crd/{apps.kusionstack.io_rulesets.yaml => apps.kusionstack.io_podtransitionrules.yaml} (96%) diff --git a/charts/operating b/charts/operating index 8b57616..4d08656 120000 --- a/charts/operating +++ b/charts/operating @@ -1 +1 @@ -../versions/operating/0.1.0-beta.1 \ No newline at end of file +../versions/operating/0.1.0 \ No newline at end of file diff --git a/versions/operating/0.1.0/Chart.yaml b/versions/operating/0.1.0/Chart.yaml index 511f9be..7fde8ac 100644 --- a/versions/operating/0.1.0/Chart.yaml +++ b/versions/operating/0.1.0/Chart.yaml @@ -4,12 +4,12 @@ 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 +version: 0.1.0 # 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 +appVersion: 0.1.0 home: https://KusionStack.io sources: diff --git a/versions/operating/0.1.0/templates/crd/apps.kusionstack.io_collasets.yaml b/versions/operating/0.1.0/templates/crd/apps.kusionstack.io_collasets.yaml index 8db4408..73d0e39 100644 --- a/versions/operating/0.1.0/templates/crd/apps.kusionstack.io_collasets.yaml +++ b/versions/operating/0.1.0/templates/crd/apps.kusionstack.io_collasets.yaml @@ -26,6 +26,10 @@ spec: jsonPath: .status.replicas name: CURRENT type: integer + - description: The number of pods available. + jsonPath: .status.availableReplicas + name: AVAILABLE + type: integer - description: The number of pods updated. jsonPath: .status.updatedReplicas name: UPDATED @@ -95,6 +99,11 @@ spec: It is not allowed to change. Context defaults to be CollaSet's name. type: string + operationDelaySeconds: + description: OperationDelaySeconds indicates how many seconds + it should delay before operating scale. + format: int32 + type: integer persistentVolumeClaimRetentionPolicy: description: PersistentVolumeClaimRetentionPolicy describes the lifecycle of PersistentVolumeClaim created from volumeClaimTemplates. @@ -190,6 +199,11 @@ spec: will be employed to update Pods in the CollaSet when a revision is made to Template. properties: + operationDelaySeconds: + description: OperationDelaySeconds indicates how many seconds + it should delay before operating update. + format: int32 + type: integer podUpgradePolicy: description: PodUpdatePolicy indicates the policy by to update pods. diff --git a/versions/operating/0.1.0/templates/crd/apps.kusionstack.io_rulesets.yaml b/versions/operating/0.1.0/templates/crd/apps.kusionstack.io_podtransitionrules.yaml similarity index 96% rename from versions/operating/0.1.0/templates/crd/apps.kusionstack.io_rulesets.yaml rename to versions/operating/0.1.0/templates/crd/apps.kusionstack.io_podtransitionrules.yaml index ef2b7db..e7fb88a 100644 --- a/versions/operating/0.1.0/templates/crd/apps.kusionstack.io_rulesets.yaml +++ b/versions/operating/0.1.0/templates/crd/apps.kusionstack.io_podtransitionrules.yaml @@ -5,22 +5,22 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.10.0 creationTimestamp: null - name: rulesets.apps.kusionstack.io + name: podtransitionrules.apps.kusionstack.io spec: group: apps.kusionstack.io names: - kind: RuleSet - listKind: RuleSetList - plural: rulesets + kind: PodTransitionRule + listKind: PodTransitionRuleList + plural: podtransitionrules shortNames: - rs - singular: ruleset + singular: podtransitionrule scope: Namespaced versions: - name: v1alpha1 schema: openAPIV3Schema: - description: RuleSet is the Schema for the rulesets API + description: PodTransitionRule is the Schema for the podtransitionrules API properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -35,7 +35,7 @@ spec: metadata: type: object spec: - description: RuleSetSpec defines the desired state of RuleSet + description: PodTransitionRuleSpec defines the desired state of PodTransitionRule properties: rules: description: Rules is a set of rules that need to be checked in certain @@ -258,7 +258,7 @@ spec: type: object type: array selector: - description: Selector select the targets controlled by ruleset + description: Selector select the targets controlled by podtransitionrule properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -304,10 +304,10 @@ spec: x-kubernetes-map-type: atomic type: object status: - description: RuleSetStatus defines the observed state of RuleSet + description: PodTransitionRuleStatus defines the observed state of PodTransitionRule properties: details: - description: Details contains all pods ruleset details + description: Details contains all pods podtransitionrule details items: properties: name: @@ -335,7 +335,7 @@ spec: type: array observedGeneration: description: ObservedGeneration is the most recent generation observed - for RuleSet + for PodTransitionRule format: int64 type: integer ruleStates: @@ -353,8 +353,8 @@ spec: processing progress properties: itemStatus: - description: RuleSetPodStatus is async request status representing - the info of pods + description: PodTransitionRulePodStatus is async request + status representing the info of pods items: description: ItemStatus defines async request info of resources @@ -393,7 +393,7 @@ spec: type: object type: array targets: - description: Targets contains the target resource names this RuleSet + description: Targets contains the target resource names this PodTransitionRule is able to select. items: type: string diff --git a/versions/operating/0.1.0/templates/deployment.yaml b/versions/operating/0.1.0/templates/deployment.yaml index 04ad5b1..ff54ed6 100644 --- a/versions/operating/0.1.0/templates/deployment.yaml +++ b/versions/operating/0.1.0/templates/deployment.yaml @@ -48,11 +48,6 @@ spec: periodSeconds: 10 resources: {{- toYaml .Values.resources | nindent 10 }} - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL serviceAccountName: kusionstack-controller-manager terminationGracePeriodSeconds: 0 volumes: diff --git a/versions/operating/0.1.0/templates/rbac/rbac.yaml b/versions/operating/0.1.0/templates/rbac/rbac.yaml index 02c4515..06f194b 100644 --- a/versions/operating/0.1.0/templates/rbac/rbac.yaml +++ b/versions/operating/0.1.0/templates/rbac/rbac.yaml @@ -120,7 +120,7 @@ rules: - apiGroups: - apps.kusionstack.io resources: - - rulesets + - podtransitionrules verbs: - create - delete @@ -132,13 +132,13 @@ rules: - apiGroups: - apps.kusionstack.io resources: - - rulesets/finalizers + - podtransitionrules/finalizers verbs: - update - apiGroups: - apps.kusionstack.io resources: - - rulesets/status + - podtransitionrules/status verbs: - get - patch diff --git a/versions/operating/0.1.0/templates/webhook/webhook.yaml b/versions/operating/0.1.0/templates/webhook/webhook.yaml index 1488eec..56e5698 100644 --- a/versions/operating/0.1.0/templates/webhook/webhook.yaml +++ b/versions/operating/0.1.0/templates/webhook/webhook.yaml @@ -9,14 +9,14 @@ webhooks: - v1beta1 clientConfig: service: - name: kusionstack-controller-manager namespace: {{ .Values.namespace }} + name: kusionstack-controller-manager path: /mutating-generic failurePolicy: Fail - name: mutating-generic.apps.kusionstack.io + name: mutating-pod.apps.kusionstack.io objectSelector: matchExpressions: - - key: podopslifecycle.kusionstack.io/control + - key: kusionstack.io/control operator: In values: - "true" @@ -34,6 +34,28 @@ webhooks: - pods/status scope: '*' sideEffects: NoneOnDryRun +- name: mutating-generic.apps.kusionstack.io + sideEffects: NoneOnDryRun + admissionReviewVersions: + - v1 + - v1beta1 + clientConfig: + service: + namespace: {{ .Values.namespace }} + name: kusionstack-controller-manager + path: /mutating-generic + failurePolicy: Fail + rules: + - apiGroups: + - "apps.kusionstack.io" + apiVersions: + - "*" + operations: + - CREATE + - UPDATE + - DELETE + resources: + - "*/*" --- apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration @@ -45,14 +67,14 @@ webhooks: - v1beta1 clientConfig: service: - name: kusionstack-controller-manager namespace: {{ .Values.namespace }} + name: kusionstack-controller-manager path: /validating-generic failurePolicy: Fail - name: validating-generic.apps.kusionstack.io + name: validating-pod.apps.kusionstack.io objectSelector: matchExpressions: - - key: podopslifecycle.kusionstack.io/control + - key: kusionstack.io/control operator: In values: - "true" @@ -67,4 +89,27 @@ webhooks: resources: - pods scope: '*' - sideEffects: NoneOnDryRun \ No newline at end of file + sideEffects: NoneOnDryRun +- name: validating-generic.apps.kusionstack.io + sideEffects: NoneOnDryRun + admissionReviewVersions: + - v1 + - v1beta1 + clientConfig: + service: + namespace: {{ .Values.namespace }} + name: kusionstack-controller-manager + path: /validating-generic + failurePolicy: Fail + rules: + - apiGroups: + - "apps.kusionstack.io" + apiVersions: + - "*" + operations: + - CREATE + - UPDATE + - DELETE + resources: + - "*/*" + scope: '*' \ No newline at end of file diff --git a/versions/operating/0.1.0/values.yaml b/versions/operating/0.1.0/values.yaml index bbc1234..aa47db2 100644 --- a/versions/operating/0.1.0/values.yaml +++ b/versions/operating/0.1.0/values.yaml @@ -11,7 +11,7 @@ namespaceEnabled: true controlPlane: kusionstack-operating image: - tag: v0.1.0-beta.1 + tag: v0.1.0 repo: kusionstack/operating pullPolicy: IfNotPresent