Skip to content

Commit

Permalink
Rebrand Helm chart (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
arybolovlev authored Jul 26, 2024
1 parent 1fc097c commit 393fc3f
Show file tree
Hide file tree
Showing 20 changed files with 48 additions and 62 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ docs: crd-ref-docs ## Generate API reference documentation.

.PHONY: helm-docs
helm-docs: install-helm-docs ## Generate Helm chart documentation.
$(HELM_DOCS) --log-level=debug --chart-search-root=./charts/terraform-cloud-operator/
$(HELM_DOCS) --log-level=debug --chart-search-root=./charts/hcp-terraform-operator/

##@ Development

Expand All @@ -104,7 +104,7 @@ manifests: controller-gen docs ## Generate WebhookConfiguration, ClusterRole and
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." \
output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." \
output:crd:artifacts:config=charts/terraform-cloud-operator/crds
output:crd:artifacts:config=charts/hcp-terraform-operator/crds
$(MAKE) copywrite

.PHONY: generate
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: MPL-2.0

apiVersion: v2
name: terraform-cloud-operator
name: hcp-terraform-operator
description: Official Helm chart for HCP Terraform Operator for Kubernetes.
type: application
version: "2.5.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@
Make changes _only_ in the README.md.gotmpl file and then run `make helm-docs` to generate the README.md file.
-->

> **Warning**
> In upcoming releases, we shall proceed with renaming this project to HCP Terraform Operator for Kubernetes or simply HCP Terraform Operator. This measure is necessary in response to the recent announcement of [The Infrastructure Cloud](https://www.hashicorp.com/blog/introducing-the-infrastructure-cloud).
>
> The most noticeable change you can expect in version 2.6.0 is the renaming of this repository and related resources, such as the Helm chart and Docker Hub names.
>
> Please follow the changelogs for updates.
# Installation

Use the option `--version VERSION` with `helm install` and `helm upgrade` commands to specify the version you want to install.
Expand All @@ -31,7 +24,7 @@ Use the option `--version VERSION` with `helm install` and `helm upgrade` comman
3. Install

```console
$ helm install demo hashicorp/terraform-cloud-operator \
$ helm install demo hashicorp/hcp-terraform-operator \
--version 2.5.0 \
--namespace tfc-operator-system \
--create-namespace
Expand All @@ -42,7 +35,7 @@ Below are examples of the Operator installation/upgrade Helm chart with options.
### Install with options

```console
$ helm install demo hashicorp/terraform-cloud-operator \
$ helm install demo hashicorp/hcp-terraform-operator \
--version 2.5.0 \
--namespace tfc-operator-system \
--create-namespace \
Expand All @@ -61,7 +54,7 @@ In the above example, the Operator will watch 3 namespaces in the Kubernetes clu
If targeting a Terraform Enterprise instance rather than HCP Terraform, set the API endpoint URL using the `operator.tfeAddress` value:

```console
$ helm install demo hashicorp/terraform-cloud-operator \
$ helm install demo hashicorp/hcp-terraform-operator \
--version 2.5.0 \
--set operator.tfeAddress="https://tfe-api.my-company.com"
```
Expand All @@ -73,9 +66,9 @@ For more information, please refer to the [FAQ](./../../docs/faq.md#general-ques
### Upgrade with options

```console
$ helm upgrade demo hashicorp/terraform-cloud-operator \
$ helm upgrade demo hashicorp/hcp-terraform-operator \
--version 2.5.0 \
--namespace tfc-operator-system \
--namespace hcp-terraform-operator-system \
--set operator.syncPeriod=5m \
--set controllers.agentPool.workers=5 \
--set controllers.module.workers=10 \
Expand All @@ -96,47 +89,47 @@ For a more detailed explanation, please refer to the [FAQ](../../docs/faq.md#gen
- The `AgentPool` CRD has been changed:

```console
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/terraform-cloud-operator/v2.6.0/charts/terraform-cloud-operator/crds/app.terraform.io_agentpools.yaml
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/hcp-terraform-operator/v2.6.0/charts/hcp-terraform-operator/crds/app.terraform.io_agentpools.yaml
```

- `2.3.0` to `2.4.0`

- The `Workspace` CRD has been changed:

```console
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/terraform-cloud-operator/v2.4.0/charts/terraform-cloud-operator/crds/app.terraform.io_workspaces.yaml
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/hcp-terraform-operator/v2.4.0/charts/hcp-terraform-operator/crds/app.terraform.io_workspaces.yaml
```

- `2.2.0` to `2.3.0`

- The `Workspace` CRD has been changed:

```console
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/terraform-cloud-operator/v2.3.0/charts/terraform-cloud-operator/crds/app.terraform.io_workspaces.yaml
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/hcp-terraform-operator/v2.3.0/charts/hcp-terraform-operator/crds/app.terraform.io_workspaces.yaml
```

- `2.1.0` to `2.2.0`

- A new controller `Project` has been added:

```console
$ kubectl apply -f https://raw.githubusercontent.com/hashicorp/terraform-cloud-operator/v2.2.0/charts/terraform-cloud-operator/crds/app.terraform.io_projects.yaml
$ kubectl apply -f https://raw.githubusercontent.com/hashicorp/hcp-terraform-operator/v2.2.0/charts/hcp-terraform-operator/crds/app.terraform.io_projects.yaml
```

- `2.0.0` to `2.1.0`

- The `Workspace` CRD has been changed:

```console
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/terraform-cloud-operator/v2.1.0/charts/terraform-cloud-operator/crds/app.terraform.io_workspaces.yaml
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/hcp-terraform-operator/v2.1.0/charts/hcp-terraform-operator/crds/app.terraform.io_workspaces.yaml
```

- `2.0.0-betaX` to `2.0.0`

- The `AgentPool` CRD has been changed:

```console
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/terraform-cloud-operator/v2.0.0/charts/terraform-cloud-operator/crds/app.terraform.io_agentpools.yaml
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/hcp-terraform-operator/v2.0.0/charts/hcp-terraform-operator/crds/app.terraform.io_agentpools.yaml
```

# Values
Expand All @@ -160,7 +153,7 @@ For a more detailed explanation, please refer to the [FAQ](../../docs/faq.md#gen
| kubeRbacProxy.resources.requests.memory | string | `"64Mi"` | Guaranteed minimum amount of memory to be used by a container. |
| kubeRbacProxy.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"seccompProfile":{"type":"RuntimeDefault"}}` | Container security context. More information in [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/). |
| operator.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy. |
| operator.image.repository | string | `"hashicorp/terraform-cloud-operator"` | Image repository. |
| operator.image.repository | string | `"hashicorp/hcp-terraform-operator"` | Image repository. |
| operator.image.tag | string | `""` | Image tag. Defaults to `.Chart.AppVersion`. |
| operator.resources.limits.cpu | string | `"500m"` | Limits as a maximum amount of CPU to be used by a container. |
| operator.resources.limits.memory | string | `"128Mi"` | Limits as a maximum amount of memory to be used by a container. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@
Make changes _only_ in the README.md.gotmpl file and then run `make helm-docs` to generate the README.md file.
-->

> **Warning**
> In upcoming releases, we shall proceed with renaming this project to HCP Terraform Operator for Kubernetes or simply HCP Terraform Operator. This measure is necessary in response to the recent announcement of [The Infrastructure Cloud](https://www.hashicorp.com/blog/introducing-the-infrastructure-cloud).
>
> The most noticeable change you can expect in version 2.6.0 is the renaming of this repository and related resources, such as the Helm chart and Docker Hub names.
>
> Please follow the changelogs for updates.

# Installation

Use the option `--version VERSION` with `helm install` and `helm upgrade` commands to specify the version you want to install.
Expand All @@ -31,7 +24,7 @@ Use the option `--version VERSION` with `helm install` and `helm upgrade` comman
3. Install

```console
$ helm install demo hashicorp/terraform-cloud-operator \
$ helm install demo hashicorp/hcp-terraform-operator \
--version {{ template "chart.appVersion" . }} \
--namespace tfc-operator-system \
--create-namespace
Expand All @@ -42,7 +35,7 @@ Below are examples of the Operator installation/upgrade Helm chart with options.
### Install with options

```console
$ helm install demo hashicorp/terraform-cloud-operator \
$ helm install demo hashicorp/hcp-terraform-operator \
--version {{ template "chart.appVersion" . }} \
--namespace tfc-operator-system \
--create-namespace \
Expand All @@ -61,7 +54,7 @@ In the above example, the Operator will watch 3 namespaces in the Kubernetes clu
If targeting a Terraform Enterprise instance rather than HCP Terraform, set the API endpoint URL using the `operator.tfeAddress` value:

```console
$ helm install demo hashicorp/terraform-cloud-operator \
$ helm install demo hashicorp/hcp-terraform-operator \
--version {{ template "chart.appVersion" . }} \
--set operator.tfeAddress="https://tfe-api.my-company.com"
```
Expand All @@ -73,9 +66,9 @@ For more information, please refer to the [FAQ](./../../docs/faq.md#general-ques
### Upgrade with options

```console
$ helm upgrade demo hashicorp/terraform-cloud-operator \
$ helm upgrade demo hashicorp/hcp-terraform-operator \
--version {{ template "chart.appVersion" . }} \
--namespace tfc-operator-system \
--namespace hcp-terraform-operator-system \
--set operator.syncPeriod=5m \
--set controllers.agentPool.workers=5 \
--set controllers.module.workers=10 \
Expand All @@ -96,7 +89,7 @@ For a more detailed explanation, please refer to the [FAQ](../../docs/faq.md#gen
- The `AgentPool` CRD has been changed:

```console
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/terraform-cloud-operator/v2.6.0/charts/terraform-cloud-operator/crds/app.terraform.io_agentpools.yaml
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/hcp-terraform-operator/v2.6.0/charts/hcp-terraform-operator/crds/app.terraform.io_agentpools.yaml
```


Expand All @@ -105,39 +98,39 @@ For a more detailed explanation, please refer to the [FAQ](../../docs/faq.md#gen
- The `Workspace` CRD has been changed:

```console
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/terraform-cloud-operator/v2.4.0/charts/terraform-cloud-operator/crds/app.terraform.io_workspaces.yaml
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/hcp-terraform-operator/v2.4.0/charts/hcp-terraform-operator/crds/app.terraform.io_workspaces.yaml
```

- `2.2.0` to `2.3.0`

- The `Workspace` CRD has been changed:

```console
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/terraform-cloud-operator/v2.3.0/charts/terraform-cloud-operator/crds/app.terraform.io_workspaces.yaml
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/hcp-terraform-operator/v2.3.0/charts/hcp-terraform-operator/crds/app.terraform.io_workspaces.yaml
```

- `2.1.0` to `2.2.0`

- A new controller `Project` has been added:

```console
$ kubectl apply -f https://raw.githubusercontent.com/hashicorp/terraform-cloud-operator/v2.2.0/charts/terraform-cloud-operator/crds/app.terraform.io_projects.yaml
$ kubectl apply -f https://raw.githubusercontent.com/hashicorp/hcp-terraform-operator/v2.2.0/charts/hcp-terraform-operator/crds/app.terraform.io_projects.yaml
```

- `2.0.0` to `2.1.0`

- The `Workspace` CRD has been changed:

```console
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/terraform-cloud-operator/v2.1.0/charts/terraform-cloud-operator/crds/app.terraform.io_workspaces.yaml
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/hcp-terraform-operator/v2.1.0/charts/hcp-terraform-operator/crds/app.terraform.io_workspaces.yaml
```

- `2.0.0-betaX` to `2.0.0`

- The `AgentPool` CRD has been changed:

```console
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/terraform-cloud-operator/v2.0.0/charts/terraform-cloud-operator/crds/app.terraform.io_agentpools.yaml
$ kubectl replace -f https://raw.githubusercontent.com/hashicorp/hcp-terraform-operator/v2.0.0/charts/hcp-terraform-operator/crds/app.terraform.io_agentpools.yaml
```

# Values
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Thank you for installing HashiCorp HCP Terraform Operator!

Documentation:
- https://github.com/hashicorp/terraform-cloud-operator
- https://github.com/hashicorp/hcp-terraform-operator

Your release is named {{ .Release.Name }}.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "terraform-cloud-operator.name" -}}
{{- define "hcp-terraform-operator.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -10,7 +10,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "terraform-cloud-operator.fullname" -}}
{{- define "hcp-terraform-operator.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "terraform-cloud-operator.chart" -}}
{{- define "hcp-terraform-operator.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "terraform-cloud-operator.labels" -}}
helm.sh/chart: {{ include "terraform-cloud-operator.chart" . }}
{{ include "terraform-cloud-operator.selectorLabels" . }}
{{- define "hcp-terraform-operator.labels" -}}
helm.sh/chart: {{ include "hcp-terraform-operator.chart" . }}
{{ include "hcp-terraform-operator.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "terraform-cloud-operator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "terraform-cloud-operator.name" . }}
{{- define "hcp-terraform-operator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "hcp-terraform-operator.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "terraform-cloud-operator.serviceAccountName" -}}
{{- define "hcp-terraform-operator.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "terraform-cloud-operator.fullname" .) .Values.serviceAccount.name }}
{{- default (include "hcp-terraform-operator.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ roleRef:
name: {{ .Release.Name }}-manager-role
subjects:
- kind: ServiceAccount
name: {{ include "terraform-cloud-operator.serviceAccountName" . }}
name: {{ include "hcp-terraform-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -24,5 +24,5 @@ roleRef:
name: {{ .Release.Name }}-proxy-role
subjects:
- kind: ServiceAccount
name: {{ include "terraform-cloud-operator.serviceAccountName" . }}
name: {{ include "hcp-terraform-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "terraform-cloud-operator.fullname" . }}
name: {{ include "hcp-terraform-operator.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "terraform-cloud-operator.labels" . | nindent 4 }}
{{- include "hcp-terraform-operator.labels" . | nindent 4 }}
control-plane: {{ .Release.Name }}-controller-manager
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "terraform-cloud-operator.selectorLabels" . | nindent 6 }}
{{- include "hcp-terraform-operator.selectorLabels" . | nindent 6 }}
control-plane: {{ .Release.Name }}-controller-manager
template:
metadata:
labels:
{{- include "terraform-cloud-operator.selectorLabels" . | nindent 8 }}
{{- include "hcp-terraform-operator.selectorLabels" . | nindent 8 }}
control-plane: {{ .Release.Name }}-controller-manager
spec:
{{- with .Values.imagePullSecrets }}
Expand Down Expand Up @@ -95,7 +95,7 @@ spec:
{{- toYaml .Values.kubeRbacProxy.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.kubeRbacProxy.securityContext | nindent 12 }}
serviceAccountName: {{ include "terraform-cloud-operator.serviceAccountName" . }}
serviceAccountName: {{ include "hcp-terraform-operator.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.securityContext | nindent 8 }}
terminationGracePeriodSeconds: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ roleRef:
name: {{ .Release.Name }}-leader-election-role
subjects:
- kind: ServiceAccount
name: {{ include "terraform-cloud-operator.serviceAccountName" . }}
name: {{ include "hcp-terraform-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "terraform-cloud-operator.serviceAccountName" . }}
name: {{ include "hcp-terraform-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "terraform-cloud-operator.labels" . | nindent 4 }}
{{- include "hcp-terraform-operator.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ securityContext:
operator:
image:
# -- Image repository.
repository: hashicorp/terraform-cloud-operator
repository: hashicorp/hcp-terraform-operator
# -- Image pull policy.
pullPolicy: IfNotPresent
# -- Image tag. Defaults to `.Chart.AppVersion`.
Expand Down

0 comments on commit 393fc3f

Please sign in to comment.