Skip to content

Commit

Permalink
Use dictionary for sidecars
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Jul 31, 2024
1 parent 9345eea commit a62b13e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion apis/installer/v1alpha1/trickster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type TricksterSpec struct {

type TricksterSidecars struct {
// +optional
Spec []core.Container `json:"spec"`
Spec map[string]core.Container `json:"spec"`
// +optional
Volumes []core.Volume `json:"volumes"`
}
Expand Down
6 changes: 3 additions & 3 deletions apis/installer/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion charts/trickster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: trickster
description: A Helm chart for Trickster by AppsCode
type: application
version: v2023.10.1
version: v2024.7.31
appVersion: v2.0.0-beta3
home: https://github.com/open-viz/trickster
icon: https://cdn.appscode.com/images/products/kubeops/icons/android-icon-192x192.png
Expand Down
12 changes: 6 additions & 6 deletions charts/trickster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
```bash
$ helm repo add appscode https://charts.appscode.com/stable/
$ helm repo update
$ helm search repo appscode/trickster --version=v2023.10.1
$ helm upgrade -i trickster appscode/trickster -n kubeops --create-namespace --version=v2023.10.1
$ helm search repo appscode/trickster --version=v2024.7.31
$ helm upgrade -i trickster appscode/trickster -n kubeops --create-namespace --version=v2024.7.31
```

## Introduction
Expand All @@ -24,7 +24,7 @@ This chart deploys a Trickster Server on a [Kubernetes](http://kubernetes.io) cl
To install/upgrade the chart with the release name `trickster`:

```bash
$ helm upgrade -i trickster appscode/trickster -n kubeops --create-namespace --version=v2023.10.1
$ helm upgrade -i trickster appscode/trickster -n kubeops --create-namespace --version=v2024.7.31
```

The command deploys a Trickster Server on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
Expand Down Expand Up @@ -80,19 +80,19 @@ The following table lists the configurable parameters of the `trickster` chart a
| monitoring.agent | Name of monitoring agent (eg "prometheus.io/operator") | <code>""</code> |
| monitoring.port | | <code>8080</code> |
| monitoring.serviceMonitor.labels | Specify the labels for ServiceMonitor. Prometheus crd will select ServiceMonitor using these labels. Only usable when monitoring agent is `prometheus.io/operator`. | <code>{}</code> |
| sidecars.spec | | <code>[]</code> |
| sidecars.spec | | <code>{}</code> |
| sidecars.volumes | | <code>[]</code> |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:

```bash
$ helm upgrade -i trickster appscode/trickster -n kubeops --create-namespace --version=v2023.10.1 --set replicaCount=1
$ helm upgrade -i trickster appscode/trickster -n kubeops --create-namespace --version=v2024.7.31 --set replicaCount=1
```

Alternatively, a YAML file that specifies the values for the parameters can be provided while
installing the chart. For example:

```bash
$ helm upgrade -i trickster appscode/trickster -n kubeops --create-namespace --version=v2023.10.1 --values values.yaml
$ helm upgrade -i trickster appscode/trickster -n kubeops --create-namespace --version=v2024.7.31 --values values.yaml
```
2 changes: 1 addition & 1 deletion charts/trickster/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
- mountPath: /conf.d
name: trickster-config
containers:
{{- with .Values.sidecars.spec }}
{{- with (values .Values.sidecars.spec) }}
{{- toYaml . | nindent 8 }}
{{- end }}
- name: {{ .Chart.Name }}
Expand Down
4 changes: 2 additions & 2 deletions charts/trickster/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ properties:
sidecars:
properties:
spec:
items:
additionalProperties:
description: A single application container that you want to run within
a pod.
properties:
Expand Down Expand Up @@ -2600,7 +2600,7 @@ properties:
required:
- name
type: object
type: array
type: object
volumes:
items:
description: Volume represents a named volume in a pod that may be accessed
Expand Down
2 changes: 1 addition & 1 deletion charts/trickster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@ monitoring:
labels: {}

sidecars:
spec: []
spec: {}
volumes: []

0 comments on commit a62b13e

Please sign in to comment.