diff --git a/README.md b/README.md index d78d2d86..5f6ed2f0 100644 --- a/README.md +++ b/README.md @@ -69,23 +69,18 @@ For the detailed explain and advanced usage, please check the documentation belo * [ARM64 Support](./docs/arm64.md) * [FAQ](./docs/faq.md) - ## SDK * [Golang](https://github.com/alauda/helm-crds): also contains the CRD definition - - ## Future Plans * Java SDK * Auto update of HelmRequest - - - +* ## Captain Releated Projects * [kubectl-captain](https://github.com/alauda/kubectl-captain): a kubectl plugin for captain * [captain-test-charts](https://github.com/alauda/captain-test-charts): test charts for captain - +* [oci-chartrepo](https://github.com/alauda/oci-chartrepo): use oci registry as helm chart repo ## Related Projects diff --git a/artifacts/all/deploy.yaml b/artifacts/all/deploy.yaml index d8af2d73..518d4a40 100644 --- a/artifacts/all/deploy.yaml +++ b/artifacts/all/deploy.yaml @@ -45,8 +45,68 @@ spec: openAPIV3Schema: properties: spec: + description: HelmRequestSpec defines the deploy info of a helm chart + type: object required: - chart + properties: + chart: + type: string + description: Chart is a helm chart name ,in the format of / + namespace: + type: string + description: Namespace is the namespace this chart will be installed to. If not set, consider it's metadata.namespace + releaseName: + type: string + description: ReleaseName is the Release name. If not set, consider it's metadata.name + clusterName: + type: string + description: ClusterName is the target cluster name, where this chart will be installed to. If not set, this chart will be installed to the current cluster. + dependencies: + type: array + description: Dependencies defines the HelmRequest list this HelmRequest will depends to, it will wait for them to be Synced + items: + type: string + installToAllClusters: + description: InstallToAllClusters decide if we want to install this chart to all cluster. + type: boolean + values: + type: object + nullable: true + description: Values defines custom values for this chart + version: + type: string + description: Version defines the chart version + valuesFrom: + type: array + description: ValuesFrom defines the config file we want to ref to. In kubernetes, this will be ConfigMap/Secret + items: + type: object + properties: + configMapKeyRef: + type: object + required: + - name + description: ConfigMapKeyRef defines a ref to a ConfigMap(in the same namespace) + properties: + name: + type: string + key: + type: string + optional: + type: boolean + secretKeyRef: + type: object + required: + - name + description: SecretKeyRef defines a ref to a Secret(in the same namespace) + properties: + name: + type: string + key: + type: string + optional: + type: boolean --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition @@ -125,67 +185,6 @@ spec: JSONPath: .metadata.creationTimestamp scope: Namespaced --- -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: MutatingWebhookConfiguration -metadata: - name: captain-mutating-webhook-configuration -webhooks: -- admissionReviewVersions: - - v1beta1 - clientConfig: - caBundle: Cg== - service: - name: captain-webhook - namespace: captain-system - path: /mutate - failurePolicy: Fail - name: mutate-helmrequest.app.alauda.io - namespaceSelector: {} - rules: - - apiGroups: - - app.alauda.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - helmrequests - scope: '*' - sideEffects: Unknown - timeoutSeconds: 30 ---- -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: ValidatingWebhookConfiguration -metadata: - annotations: - name: captain-validating-webhook-configuration -webhooks: -- admissionReviewVersions: - - v1beta1 - clientConfig: - caBundle: Cg== - service: - name: captain-webhook - namespace: captain-system - path: /validate - failurePolicy: Fail - name: validate-helmrequest.app.alauda.io - namespaceSelector: {} - rules: - - apiGroups: - - app.alauda.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - helmrequests - scope: '*' - sideEffects: Unknown - timeoutSeconds: 30 ---- apiVersion: v1 kind: Service metadata: @@ -194,9 +193,6 @@ metadata: service_name: captain spec: ports: - - port: 443 - targetPort: 9443 - name: webhook - port: 6060 targetPort: 6060 name: metrics @@ -238,7 +234,7 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.namespace - image: alaudapublic/captain:v1.2.2 + image: alaudapublic/captain:v1.3.0 imagePullPolicy: IfNotPresent name: manager resources: @@ -249,29 +245,6 @@ spec: cpu: 100m memory: 128Mi dnsPolicy: ClusterFirst - initContainers: - - command: - - sh - - /generate_certificate.sh - - --service - - captain-webhook - - --vwebhook - - captain-validating-webhook-configuration - - --mwebhook - - captain-mutating-webhook-configuration - - --secret - - captain-webhook-cert - - --namespace - - $(KUBERNETES_NAMESPACE) - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: alaudapublic/captain-cert-init:v1.0 - imagePullPolicy: IfNotPresent - name: cert-init --- apiVersion: v1 kind: Service diff --git a/docs/install.md b/docs/install.md index 2319c5a3..510ac0bc 100644 --- a/docs/install.md +++ b/docs/install.md @@ -22,5 +22,6 @@ alaudapublic/captain:latest ## Uninstall ```bash kubectl delete -n captain-system -f https://raw.githubusercontent.com/alauda/captain/master/artifacts/all/deploy.yaml +kubectl delete clusterrolebinding captain kubectl delete ns captain-system ```