Skip to content

Commit

Permalink
add description of .cdevignore, provider_config
Browse files Browse the repository at this point in the history
  • Loading branch information
anastyakulyk committed Jun 20, 2024
1 parent 19e5daa commit 2489c43
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 17 deletions.
10 changes: 10 additions & 0 deletions docs/stack-templates-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
89 changes: 74 additions & 15 deletions docs/units-helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions docs/units-kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.



Expand Down

0 comments on commit 2489c43

Please sign in to comment.