From 2489c43a0538dc27309f58194801748aa432af68 Mon Sep 17 00:00:00 2001 From: anastyakulyk Date: Thu, 20 Jun 2024 13:09:14 +0300 Subject: [PATCH] add description of .cdevignore, provider_config --- docs/stack-templates-overview.md | 10 ++++ docs/units-helm.md | 89 ++++++++++++++++++++++++++------ docs/units-kubernetes.md | 4 +- 3 files changed, 86 insertions(+), 17 deletions(-) diff --git a/docs/stack-templates-overview.md b/docs/stack-templates-overview.md index b1858ee9..961ae6f7 100644 --- a/docs/stack-templates-overview.md +++ b/docs/stack-templates-overview.md @@ -19,3 +19,13 @@ units: ``` Stack templates can utilize all kinds of Go templates and Sprig functions (similar to Helm). Along with that it is enhanced with functions like `insertYAML` that could pass `yaml` blocks directly. + +## `.cdevignore` + +The `.cdevignore` file is used to specify files that you don't want to be read as project/stacktemplate configs. With this file in the project dir and in the stackTemplate dir, cdev will ignore the list of specified yaml/yml files as it configs. These files should be specified as a list of full names. Templates and patterns are not supported. Example of the `.cdevignore` file: + +```yaml +deployment.yaml +foo.yml +bar.yaml +``` diff --git a/docs/units-helm.md b/docs/units-helm.md index 9e5d82aa..9aac7d45 100644 --- a/docs/units-helm.md +++ b/docs/units-helm.md @@ -54,21 +54,80 @@ In addition to common options the following are available: * `inputs` - *map of any*, *optional*. A map that represents [Terraform helm_release sets](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release#set). This block allows to use functions `remoteState` and `insertYAML`. For example: -```yaml - inputs: - global.image.tag: v1.8.3 - service.type: LoadBalancer + ```yaml + inputs: + global.image.tag: v1.8.3 + service.type: LoadBalancer ``` -Corresponds to: + Corresponds to: + + ```yaml + set { + name = "global.image.tag" + value = "v1.8.3" + } + set { + name = "service.type" + value = "LoadBalancer" + } + ``` -```yaml - set { - name = "global.image.tag" - value = "v1.8.3" - } - set { - name = "service.type" - value = "LoadBalancer" - } -``` +* `provider_conf` - configuration block that describes authorization in Kubernetes. Supports the same arguments as the [Terraform Kubernetes provider](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs#argument-reference). It is allowed to use the `remoteState` function and Cluster.dev templates within the block. + + Example usage: + + ```yaml + name: cert-manager-issuer + type: kubernetes + depends_on: this.cert-manager + source: ./deployment.yaml + provider_conf: + host: k8s.example.com + username: "user" + password: "secretPassword" + ``` + + * `host` - *optional*. The hostname (in form of URI) of the Kubernetes API. Can be sourced from `KUBE_HOST`. + + * `username` - *optional*. The username to use for HTTP basic authentication when accessing the Kubernetes API. Can be sourced from `KUBE_USER`. + + * `password` - *optional*. The password to use for HTTP basic authentication when accessing the Kubernetes API. Can be sourced from `KUBE_PASSWORD`. + + * `insecure` - *optional*. Whether the server should be accessed without verifying the TLS certificate. Can be sourced from `KUBE_INSECURE`. Defaults to `false`. + + * `tls_server_name` - *optional*. Server name passed to the server for SNI and is used in the client to check server certificates against. Can be sourced from `KUBE_TLS_SERVER_NAME`. + + * `client_certificate` - *optional*. PEM-encoded client certificate for TLS authentication. Can be sourced from `KUBE_CLIENT_CERT_DATA`. + + * `client_key` - *optional*. PEM-encoded client certificate key for TLS authentication. Can be sourced from `KUBE_CLIENT_KEY_DATA`. + + * `client_ca_certificate` - *optional*. PEM-encoded root certificates bundle for TLS authentication. Can be sourced from `KUBE_CLUSTER_CA_CERT_DATA`. + + * `config_path` - *optional*. A path to a kube config file. Can be sourced from `KUBE_CONFIG_PATH`. + + * `config_paths` - *optional*. A list of paths to the kube config files. Can be sourced from `KUBE_CONFIG_PATHS`. + + * `config_context` - *optional*. Context to choose from the config file. Can be sourced from `KUBE_CTX`. + + * `config_context_auth_info` - *optional*. Authentication info context of the kube config (name of the kubeconfig user, `--user` flag in `kubectl`). Can be sourced from `KUBE_CTX_AUTH_INFO`. + + * `config_context_cluster` - *optional*. Cluster context of the kube config (name of the kubeconfig cluster, `--cluster` flag in `kubectl`). Can be sourced from `KUBE_CTX_CLUSTER`. + + * `token` - *optional*. Token of your service account. Can be sourced from `KUBE_TOKEN` + + * `proxy_url` - *optional*. URL to the proxy to be used for all API requests. URLs with "http", "https", and "socks5" schemes are supported. Can be sourced from `KUBE_PROXY_URL`. + + * `exec` - *optional*. Configuration block to use an [exec-based credential plugin](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins), e.g. call an external command to receive user credentials. + + * `api_version` - *required*. API version to use when decoding the ExecCredentials resource, e.g. `client.authentication.k8s.io/v1beta1`. + + * `command` - *required*. Command to execute. + + * `args` - *optional*. List of arguments to pass when executing the plugin. + + * `env` - *optional*. Map of environment variables to set when executing the plugin. + + * `ignore_annotations` - *optional*. List of Kubernetes metadata annotations to ignore across all resources handled by this provider for situations where external systems are managing certain resource annotations. This option does not affect annotations within a template block. Each item is a regular expression. + + * `ignore_labels` - *optional*. List of Kubernetes metadata labels to ignore across all resources handled by this provider for situations where external systems are managing certain resource labels. This option does not affect annotations within a template block. Each item is a regular expression. \ No newline at end of file diff --git a/docs/units-kubernetes.md b/docs/units-kubernetes.md index 23afdf6f..1443e17d 100644 --- a/docs/units-kubernetes.md +++ b/docs/units-kubernetes.md @@ -81,9 +81,9 @@ units: * `env` - *optional*. Map of environment variables to set when executing the plugin. - * `ignore_annotations` - *optional*. List of Kubernetes metadata annotations to ignore across all resources handled by this provider for situations where external systems are managing certain resource annotations. Each item is a regular expression. + * `ignore_annotations` - *optional*. List of Kubernetes metadata annotations to ignore across all resources handled by this provider for situations where external systems are managing certain resource annotations. This option does not affect annotations within a template block. Each item is a regular expression. - * `ignore_labels` - *optional*. List of Kubernetes metadata labels to ignore across all resources handled by this provider for situations where external systems are managing certain resource labels. Each item is a regular expression. + * `ignore_labels` - *optional*. List of Kubernetes metadata labels to ignore across all resources handled by this provider for situations where external systems are managing certain resource labels. This option does not affect annotations within a template block. Each item is a regular expression.