Skip to content

Commit

Permalink
Use workloads.argoRollouts Helm chat value
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Rożek <[email protected]>
  • Loading branch information
P0lip committed Aug 5, 2024
1 parent 6598df1 commit f06ce66
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 18 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ jobs:
POD_NAME=$(kubectl get pod -ojsonpath='{.items[0].metadata.name}' -l app=image-importer)
kubectl cp tel2-image.tar "$POD_NAME:/tmp/image.tar"
kubectl exec $POD_NAME -- //hostbin/ctr images import //tmp/image.tar
- name: Install Argo Rollouts
shell: bash
run: |
kubectl create namespace argo-rollouts
kubectl apply -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml
- name: Run integration tests
env:
DEV_TELEPRESENCE_VERSION: ${{needs.build_image.outputs.telepresenceVersion}}
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ items:
title: Add support for Argo Rollout workloads.
body: >-
Telepresence now has an opt-in support for Argo Rollout workloads.
The behavior is controlled by `argoRollouts.enabled` Helm chart value.
The behavior is controlled by `workloads.argoRollouts.enabled` Helm chart value.
It is recommended to set the following annotation <code>telepresence.getambassador.io/inject-traffic-agent: enabled</code>
to avoid creation of unwanted revisions.
- version: 2.19.1
date: (TBD)
notes:
- title: Add brew support for the OSS version of Telepresence.
body: >-
The Open-Source Software version of Telepresence can now be installed using the brew formula
The Open-Source Software version of Telepresence can now be installed using the brew formula
via <code>brew install datawire/blackbird/telepresence-oss</code>.
docs: https://github.com/telepresenceio/telepresence/issues/3609
- type: feature
Expand Down
2 changes: 1 addition & 1 deletion charts/telepresence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ The following tables lists the configurable parameters of the Telepresence chart
| client.routing.allowConflictingSubnets | Allow the specified subnets to be routed even if they conflict with other routes on the local machine. | `[]` |
| client.dns.excludeSuffixes | Suffixes for which the client DNS resolver will always fail (or fallback in case of the overriding resolver) | `[".com", ".io", ".net", ".org", ".ru"]` |
| client.dns.includeSuffixes | Suffixes for which the client DNS resolver will always attempt to do a lookup. Includes have higher priority than excludes. | `[]` |
| argoRollouts.enabled | Enable/Disable the argo-rollouts integration. | `false` |
| workloads.argoRollouts.enabled | Enable/Disable the argo-rollouts integration. | `false` |

### RBAC

Expand Down
2 changes: 1 addition & 1 deletion charts/telepresence/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ RBAC rules required to create an intercept in a namespace; excludes any rules th
- apiGroups: ["apps"]
resources: ["deployments", "replicasets", "statefulsets"]
verbs: ["get", "watch", "list"]
{{- if .Values.argoRollouts.enabled }}
{{- if .Values.workloads.argoRollouts.enabled }}
- apiGroups: ["argoproj.io"]
resources: ["rollouts"]
verbs: ["get", "watch", "list"]
Expand Down
4 changes: 2 additions & 2 deletions charts/telepresence/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ spec:
value: {{ .grpc.maxReceiveSize }}
{{- end }}
{{- end }}
{{- if .argoRollouts }}
{{- if .workloads.argoRollouts }}
- name: ARGO_ROLLOUTS_ENABLED
value: {{ .argoRollouts.enabled | quote }}
value: {{ .workloads.argoRollouts.enabled | quote }}
{{- end }}
{{- if .agentInjector.enabled }}
{{- /*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ rules:
{{- if .Values.agentInjector.enabled }}
- patch
{{- end }}
{{- if .Values.argoRollouts.enabled }}
{{- if .Values.workloads.argoRollouts.enabled }}
- apiGroups:
- "argoproj.io"
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require less permissions in clientRbac.yaml
{{- end }}

{{- $interceptEnabled := .Values.agentInjector.enabled }}
{{- $argoRolloutsEnabled := .Values.argoRollouts.enabled }}
{{- $argoRolloutsEnabled := .Values.workloads.argoRollouts.enabled }}

{{- range .Values.managerRbac.namespaces }}
---
Expand Down
7 changes: 4 additions & 3 deletions charts/telepresence/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ client:
# Tell client's DNS resolver to always send names with these suffixes to the cluster side resolver
includeSuffixes: []

# Controls Argo Rollouts integration
argoRollouts:
enabled: false
# Controls which workload kinds are recognized by Telepresence
workloads:
argoRollouts:
enabled: false
2 changes: 1 addition & 1 deletion integration_test/argo_rollouts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func init() {

func (s *argoRolloutsSuite) SetupSuite() {
s.Suite.SetupSuite()
s.TelepresenceHelmInstallOK(s.Context(), true, "--set", "argoRollouts.enabled=true")
s.TelepresenceHelmInstallOK(s.Context(), true, "--set", "workloads.argoRollouts.enabled=true")
s.TelepresenceConnect(s.Context())
}

Expand Down
2 changes: 1 addition & 1 deletion integration_test/testdata/k8s/echo-argo-rollout.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
automountServiceAccountToken: false
containers:
- name: echo-server
image: docker.io/thhal/echo-server:latest
image: docker.io/telepresenceio/echo-server:latest
ports:
- name: http
containerPort: 8080
Expand Down

0 comments on commit f06ce66

Please sign in to comment.