Skip to content

Commit dc226ef

Browse files
authored
Merge pull request #3814 from telepresenceio/thallgren/decouple-getambassador
Unify annotations, labels, and download links
2 parents 7e842ae + e7c6535 commit dc226ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+341
-643
lines changed

.github/workflows/dev.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ jobs:
133133
- uses: ./.github/actions/upload-logs
134134
env:
135135
LOG_SUFFIX: "${{ runner.os }}-${{ runner.arch }}-${{ matrix.clusters.distribution }}-${{ matrix.clusters.version }}"
136-
if: always()
136+
if: ${{ always() }}
137137
purge_images:
138-
if: github.event.label.name == 'ok to test' || github.event.label.name == 'compatibility test'
138+
if: ${{ always() }}
139139
runs-on: ubuntu-latest
140140
permissions:
141141
packages: write
@@ -146,7 +146,6 @@ jobs:
146146
- name: Delete tel2 and telepresence image
147147
uses: dataaxiom/ghcr-cleanup-action@v1
148148
continue-on-error: true
149-
if: always()
150149
with:
151150
owner: telepresenceio
152151
packages: tel2,telepresence
@@ -158,6 +157,7 @@ jobs:
158157
owner: telepresenceio
159158
packages: tel2,telepresence
160159
token: ${{ secrets.GITHUB_TOKEN }}
160+
delete-untagged: true
161161
delete-ghost-images: true
162162
delete-partial-images: true
163163
delete-orphaned-images: true

.github/workflows/release.yaml

+16-14
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,17 @@ jobs:
9494
- name: Determine if version is RC, TEST, or GA
9595
id: semver_check
9696
run: |
97-
if [[ "${{ github.ref_name }}" =~ ^v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+$ ]]; then
97+
v=${{ github.ref_name }}
98+
echo "semver=${v#v}" >> "$GITHUB_OUTPUT"
99+
if [[ "${v}" =~ ^v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+$ ]]; then
98100
echo "make_latest=false" >> $GITHUB_OUTPUT
99101
echo "draft=false" >> $GITHUB_OUTPUT
100102
echo "prerelease=true" >> $GITHUB_OUTPUT
101-
elif [[ "${{ github.ref_name }}" =~ ^v[0-9]+.[0-9]+.[0-9]+-test.[0-9]+$ ]]; then
103+
elif [[ "${v}" =~ ^v[0-9]+.[0-9]+.[0-9]+-test.[0-9]+$ ]]; then
102104
echo "make_latest=false" >> $GITHUB_OUTPUT
103105
echo "draft=false" >> $GITHUB_OUTPUT
104106
echo "prerelease=true" >> $GITHUB_OUTPUT
105-
elif [[ "${{ github.ref_name }}" =~ ^v[0-9]+.[0-9]+.[0-9]+-draft.[0-9]+$ ]]; then
107+
elif [[ "${v}" =~ ^v[0-9]+.[0-9]+.[0-9]+-draft.[0-9]+$ ]]; then
106108
echo "make_latest=false" >> $GITHUB_OUTPUT
107109
echo "draft=true" >> $GITHUB_OUTPUT
108110
echo "prerelease=false" >> $GITHUB_OUTPUT
@@ -134,26 +136,26 @@ jobs:
134136
body: |
135137
## Official Release Artifacts
136138
### Linux
137-
- 📦 [telepresence-linux-amd64](https://app.getambassador.io/download/tel2oss/releases/download/${{ github.ref_name }}/telepresence-linux-amd64)
138-
- 📦 [telepresence-linux-arm64](https://app.getambassador.io/download/tel2oss/releases/download/${{ github.ref_name }}/telepresence-linux-arm64)
139+
- 📦 [telepresence-linux-amd64](https://github.com/telepresenceio/telepresence/releases/download/${{ github.ref_name }}/telepresence-linux-amd64)
140+
- 📦 [telepresence-linux-arm64](https://github.com/telepresenceio/telepresence/releases/download/${{ github.ref_name }}/telepresence-linux-arm64)
139141
### OSX Darwin
140-
- 📦 [telepresence-darwin-amd64](https://app.getambassador.io/download/tel2oss/releases/download/${{ github.ref_name }}/telepresence-darwin-amd64)
141-
- 📦 [telepresence-darwin-arm64](https://app.getambassador.io/download/tel2oss/releases/download/${{ github.ref_name }}/telepresence-darwin-arm64)
142+
- 📦 [telepresence-darwin-amd64](https://github.com/telepresenceio/telepresence/releases/download/${{ github.ref_name }}/telepresence-darwin-amd64)
143+
- 📦 [telepresence-darwin-arm64](https://github.com/telepresenceio/telepresence/releases/download/${{ github.ref_name }}/telepresence-darwin-arm64)
142144
### Windows
143-
- 📦 [telepresence-windows-amd64.zip](https://app.getambassador.io/download/tel2oss/releases/download/${{ github.ref_name }}/telepresence-windows-amd64.zip)
144-
- 📦 [telepresence-windows-arm64.zip](https://app.getambassador.io/download/tel2oss/releases/download/${{ github.ref_name }}/telepresence-windows-arm64.zip)
145+
- 📦 [telepresence-windows-amd64.zip](https://github.com/telepresenceio/telepresence/releases/download/${{ github.ref_name }}/telepresence-windows-amd64.zip)
146+
- 📦 [telepresence-windows-arm64.zip](https://github.com/telepresenceio/telepresence/releases/download/${{ github.ref_name }}/telepresence-windows-arm64.zip)
145147
146-
For more builds across platforms and architectures, see the `Assets` section below.
147-
And for more information, visit our [installation docs](https://www.telepresence.io/docs/quick-start/).
148+
### Helm Chart
149+
- 📦 [Telepresence Helm Chart](https://artifacthub.io/packages/helm/telepresence-oss/telepresence-oss/${{ steps.semver_check.outputs.semver }})
148150
149-
![Assets](https://static.scarf.sh/a.png?x-pxid=d842651a-2e4d-465a-98e1-4808722c01ab)
151+
For more information, visit our [installation docs](https://www.telepresence.io/docs/quick-start/).
150152
- uses: actions/checkout@v4
151153
if: ${{ steps.semver_check.outputs.make_latest == 'true' }}
152154
- name: Update Homebrew
153155
if: ${{ steps.semver_check.outputs.make_latest == 'true' }}
154156
run: |
155157
v=${{ github.ref_name }}
156-
packaging/homebrew-package.sh "${v#v}" tel2oss "${{ vars.GH_BOT_USER }}" "${{ vars.GH_BOT_EMAIL }}" "${{ secrets.HOMEBREW_TAP_TOKEN }}"
158+
packaging/homebrew-package.sh "${v#v}" "${{ vars.GH_BOT_USER }}" "${{ vars.GH_BOT_EMAIL }}" "${{ secrets.HOMEBREW_TAP_TOKEN }}"
157159
158160
test-release:
159161
needs:
@@ -174,7 +176,7 @@ jobs:
174176
steps:
175177
- name: download binary
176178
env:
177-
DOWNLOAD_URL: "https://app.getambassador.io/download/tel2oss/releases/download/${{ github.ref_name }}"
179+
DOWNLOAD_URL: "https://github.com/telepresenceio/telepresence/releases/download/${{ github.ref_name }}"
178180
shell: bash
179181
run: |
180182
if [ "${{ runner.os }}" = "macOS" ]; then

CHANGELOG.yml

+12
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,18 @@ items:
109109
body: >-
110110
Users can now use the Helm value `agent.initSecurityContext` to override the default securityContext for the
111111
Telepresence init-container.
112+
- type: change
113+
title: Let download page use direct links to GitHub
114+
body: >-
115+
The download links on the release page now points directly to the assets on the download page, instead of
116+
using being routed from getambassador.io/download/tel2oss/releases.
117+
- type: change
118+
title: Use telepresence.io as annotation prefix instead of telepresence.getambassador.io
119+
body: >-
120+
The workload and pod annotations used by Telepresence will now use the prefix `telepresence.io` instead of
121+
`telepresence.getambassador.io`. The new prefix is consistent with the prefix used by labels, and it also
122+
matches the host name of the documentation site. Annotations using the old name will still work, but warnings
123+
will be logged when they are encountered.
112124
- type: change
113125
title: Make the DNS recursion check configurable and turn it off by default.
114126
body: >-

DEPENDENCIES.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ following Free and Open Source software:
129129
github.com/spf13/cobra v1.8.1 Apache License 2.0
130130
github.com/spf13/pflag v1.0.6 3-clause BSD license
131131
github.com/stretchr/testify v1.10.0 MIT license
132-
github.com/telepresenceio/go-fuseftp v0.6.2 Apache License 2.0
133-
github.com/telepresenceio/go-fuseftp/rpc v0.6.2 Apache License 2.0
132+
github.com/telepresenceio/go-fuseftp v0.6.4 Apache License 2.0
133+
github.com/telepresenceio/go-fuseftp/rpc v0.6.4 Apache License 2.0
134134
github.com/telepresenceio/telepresence/rpc/v2 (modified) Apache License 2.0
135135
github.com/vishvananda/netlink v1.3.0 Apache License 2.0
136136
github.com/vishvananda/netns v0.0.5 Apache License 2.0

README.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ A few quick ways to start using Telepresence:
2828
* **Contributor's Guide:** [Guide](https://github.com/telepresenceio/telepresence/blob/release/v2/CONTRIBUTING.md)
2929
* **Meetings:** Check out our community [meeting schedule](https://github.com/telepresenceio/telepresence/blob/release/v2/MEETING_SCHEDULE.md) for opportunities to interact with Telepresence developers
3030

31-
## Enterprise Version
32-
33-
Find out more about Telepresence Enterprise and related products at [getambassador.io](https://www.getambassador.io/products/telepresence).
34-
3531
## Walkthrough
3632

3733
### Install an interceptable service:
@@ -230,8 +226,8 @@ Labels: app=hello
230226
pod-template-hash=75b7c6d484
231227
telepresence.io/workloadEnabled=true
232228
telepresence.io/workloadName=hello
233-
Annotations: telepresence.getambassador.io/inject-traffic-agent: enabled
234-
telepresence.getambassador.io/restartedAt: 2024-01-07T00:01:33Z
229+
Annotations: telepresence.io/inject-traffic-agent: enabled
230+
telepresence.io/restartedAt: 2024-01-07T00:01:33Z
235231
Status: Running
236232
IP: 10.244.0.89
237233
IPs:
@@ -427,8 +423,6 @@ When a locally running application makes a network request to a service in the c
427423
The operating system then sees that the TUN device has an address in the same subnet as the address of the outgoing packets and sends them to `tel0`.
428424
Telepresence is on the other side of `tel0` and picks up the packets, injecting them into the cluster through a gRPC connection with Traffic Manager.
429425

430-
For a more in-depth overview, checkout our blog post: [Implementing Telepresence Networking with a TUN device](https://blog.getambassador.io/implementing-telepresence-networking-with-a-tun-device-a23a786d51e9)
431-
432426
## Troubleshooting
433427

434428
Visit the troubleshooting section in the Telepresence documentation for more advice:

build-aux/admission_controller_tls/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func generateKeyTriplet(mgrNamespace string) (crtPem, keyPem, caPem []byte, err
8383
caCert := &x509.Certificate{
8484
SerialNumber: big.NewInt(0xefecab0),
8585
Subject: pkix.Name{
86-
Organization: []string{"getambassador.io"},
86+
Organization: []string{"telepresence.io"},
8787
},
8888
NotBefore: time.Now(),
8989
NotAfter: time.Now().AddDate(1, 0, 0),
@@ -114,7 +114,7 @@ func generateKeyTriplet(mgrNamespace string) (crtPem, keyPem, caPem []byte, err
114114
SerialNumber: big.NewInt(0xefecab1),
115115
Subject: pkix.Name{
116116
CommonName: commonName,
117-
Organization: []string{"getambassador.io"},
117+
Organization: []string{"telepresence.io"},
118118
},
119119
NotBefore: time.Now(),
120120
NotAfter: time.Now().AddDate(10, 0, 0), // Valid 10 years

build-aux/main.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ promote-to-stable: ## (Release) Update stable.txt in S3
359359
--body $(BUILDDIR)/stable.txt
360360
ifeq ($(GOHOSTOS), darwin)
361361
# Since the enterprise version is built from a different makefile, we only use the oss target here. Ref: https://github.com/telepresenceio/telepresence/pull/3626#issuecomment-2200150895
362-
packaging/homebrew-package.sh $(TELEPRESENCE_SEMVER) "tel2oss"
362+
packaging/homebrew-package.sh $(TELEPRESENCE_SEMVER)
363363
endif
364364

365365
# Prerequisites:

charts/telepresence-oss/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Telepresence
22

3-
[Telepresence](https://www.getambassador.io/products/telepresence/) is a tool
3+
[Telepresence](https://telepresence.io/) is a tool
44
that allows for local development of microservices running in a remote
55
Kubernetes cluster.
66

@@ -13,7 +13,7 @@ their services.
1313
The telepresence binary embeds the helm chart, so the easiest way to install is:
1414

1515
```sh
16-
$ telepresence helm install [--set x=y | --values <values file>]
16+
$ telepresence helm install [--set x=y | --values <values file>]
1717
```
1818

1919
## Configuration

charts/telepresence-oss/templates/agentInjectorWebhook.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ webhooks:
110110
scope: '*'
111111
failurePolicy: {{ .Values.agentInjector.webhook.failurePolicy }}
112112
reinvocationPolicy: {{ .Values.agentInjector.webhook.reinvocationPolicy }}
113-
name: agent-injector-{{ include "traffic-manager.namespace" $ }}.getambassador.io
113+
name: agent-injector-{{ include "traffic-manager.namespace" $ }}.telepresence.io
114114
sideEffects: {{ .Values.agentInjector.webhook.sideEffects }}
115115
timeoutSeconds: {{ .Values.agentInjector.webhook.timeoutSeconds }}
116116
namespaceSelector:

charts/telepresence-oss/values.schema.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ properties:
360360
isCI:
361361
description: isCI can be set to force the traffic-manager namespace to be "ambassador"
362362
type: boolean
363-
default: false
364363

365364
livenessProbe:
366365
description: Define livenessProbe for the traffic-manager

cmd/traffic/cmd/agent/agent.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func AppEnvironment(ctx context.Context, mounts agentconfig.MountPolicies, ag *a
5757
// Add prefixed variables separately last, so that we can
5858
// ensure that they have higher precedence.
5959
for _, env := range osEnv {
60-
if !strings.HasPrefix(env, agentconfig.EnvPrefix) && !strings.Contains(env, "_TELEPRESENCE_MOUNTS=") {
60+
if !(strings.HasPrefix(env, agentconfig.EnvPrefix) || strings.HasPrefix(env, prefix)) {
6161
pair := strings.SplitN(env, "=", 2)
6262
if len(pair) == 2 {
6363
k := pair[0]

cmd/traffic/cmd/manager/config/config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616

1717
"github.com/datawire/dlib/dlog"
1818
"github.com/telepresenceio/telepresence/v2/cmd/traffic/cmd/manager/namespaces"
19-
"github.com/telepresenceio/telepresence/v2/pkg/agentmap"
19+
"github.com/telepresenceio/telepresence/v2/pkg/agentconfig"
2020
"github.com/telepresenceio/telepresence/v2/pkg/client"
2121
"github.com/telepresenceio/telepresence/v2/pkg/k8sapi"
2222
"github.com/telepresenceio/telepresence/v2/pkg/labels"
@@ -26,7 +26,7 @@ const (
2626
clientConfigFileName = "client.yaml"
2727
agentEnvConfigFileName = "agent-env.yaml"
2828
namespaceSelectorConfigFileName = "namespace-selector.yaml"
29-
cfgConfigMapName = agentmap.ManagerAppName
29+
cfgConfigMapName = agentconfig.ManagerAppName
3030
)
3131

3232
type Watcher interface {

cmd/traffic/cmd/manager/mutator/agent_injector.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (a *agentInjector) Inject(ctx context.Context, req *admission.AdmissionRequ
108108
dlog.Debugf(ctx, "Handling admission request %s %s.%s", req.Operation, pod.Name, pod.Namespace)
109109
env := managerutil.GetEnv(ctx)
110110

111-
ia := pod.Annotations[agentconfig.InjectAnnotation]
111+
ia := agentconfig.GetAnnotation(ctx, pod.Annotations, agentconfig.InjectAnnotation, agentconfig.LegacyInjectAnnotation)
112112

113113
var scx agentconfig.SidecarExt
114114
switch ia {
@@ -164,7 +164,7 @@ func createPatch(ctx context.Context, config *agentconfig.Sidecar, pod *core.Pod
164164
patches = addInitContainer(pod, config, patches)
165165
patches, annotations = addAgentContainer(ctx, pod, config, patches)
166166
patches = addPullSecrets(pod, config, patches)
167-
patches = addAgentVolumes(pod, config, patches)
167+
patches = addAgentVolumes(pod, patches)
168168
patches = hidePorts(pod, config, patches)
169169
annotations[agentconfig.InjectAnnotation] = "enabled"
170170
patches = addPodAnnotations(pod, annotations, patches)
@@ -279,13 +279,13 @@ func addInitContainer(pod *core.Pod, config *agentconfig.Sidecar, patches PatchO
279279
})
280280
}
281281

282-
func addAgentVolumes(pod *core.Pod, ag *agentconfig.Sidecar, patches PatchOps) PatchOps {
282+
func addAgentVolumes(pod *core.Pod, patches PatchOps) PatchOps {
283283
for _, vol := range pod.Spec.Volumes {
284-
if vol.Name == agentconfig.AnnotationVolumeName {
284+
if vol.Name == agentconfig.ExportsVolumeName {
285285
return patches
286286
}
287287
}
288-
avs := agentconfig.AgentVolumes(ag.AgentName, pod)
288+
avs := agentconfig.AgentVolumes()
289289
if len(avs) == 0 {
290290
return patches
291291
}

0 commit comments

Comments
 (0)