Skip to content

Commit

Permalink
make generate
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Hallgren <[email protected]>
  • Loading branch information
thallgren committed Oct 2, 2024
1 parent d2b197d commit 01aa30b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 16 deletions.
6 changes: 1 addition & 5 deletions build-aux/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ generate-clean: ## (Generate) Delete generated files
rm -rf ./vendor
rm -f DEPENDENCIES.md
rm -f DEPENDENCY_LICENSES.md
rm -f docs/README.md
rm -f docs/releaseNotes.md

CHANGELOG.yml: FORCE
@# Check if the version is in the x.x.x format (GA release)
Expand All @@ -130,9 +128,7 @@ CHANGELOG.yml: FORCE
docs-files: docs/README.md docs/release-notes.md docs/release-notes.mdx

docs/README.md: docs/doc-links.yml $(tools/tocgen)
printf "# <img src="images/logo.png" height="64px"/> Telepresence Documentation\n" > $@
printf "raw markdown version, more bells and whistles at [telepresence.io](https://telepresence.io)\n\n" >> $@
$(tools/tocgen) --input $< >> $@
$(tools/tocgen) --input $< > $@

docs/release-notes.md: CHANGELOG.yml $(tools/relnotesgen)
$(tools/relnotesgen) --input $< > $@
Expand Down
2 changes: 1 addition & 1 deletion build-aux/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ $(TOOLSBINDIR)/tocgen$(EXE): $(TOOLSSRCDIR)/tocgen/*.go
# ==========
#
tools/relnotesgen = $(TOOLSBINDIR)/relnotesgen$(EXE)
$(TOOLSBINDIR)/relnotesgen$(EXE): $(TOOLSSRCDIR)/relnotesgen/**/*.go $(TOOLSSRCDIR)/relnotesgen/relnotes/relnotes.gomd
$(TOOLSBINDIR)/relnotesgen$(EXE): $(TOOLSSRCDIR)/relnotesgen/**/*.go $(TOOLSSRCDIR)/relnotesgen/relnotes/relnotes.*
(cd $(TOOLSSRCDIR)/relnotesgen && GOOS= GOARCH= go build) && mv $(TOOLSSRCDIR)/relnotesgen/relnotesgen $(TOOLSBINDIR)

# Shellcheck
Expand Down
4 changes: 3 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ raw markdown version, more bells and whistles at [telepresence.io](https://telep
- Core concepts
- [The developer experience and the inner dev loop](concepts/devloop.md)
- [Making the remote local: Faster feedback, collaboration and debugging](concepts/faster.md)
- [Using Telepresence with Docker](concepts/docker.md)
- [Intercepts](concepts/intercepts.md)
- How do I...
- [Intercept a service in your own environment](howtos/intercepts.md)
Expand All @@ -27,7 +28,7 @@ raw markdown version, more bells and whistles at [telepresence.io](https://telep
- [Using Docker for intercepts](reference/docker-run.md)
- [Running Telepresence in a Docker container](reference/inside-container.md)
- [Environment variables](reference/environment.md)
- [Intercepts]
- Intercepts
- [Configure intercept using CLI](reference/intercepts/cli.md)
- [Traffic Agent Sidecar](reference/intercepts/sidecar.md)
- [Volume mounts](reference/volume.md)
Expand All @@ -36,6 +37,7 @@ raw markdown version, more bells and whistles at [telepresence.io](https://telep
- [Telepresence and VPNs](reference/vpn.md)
- [Networking through Virtual Network Interface](reference/tun-device.md)
- [Connection Routing](reference/routing.md)
- [Monitoring](reference/monitoring.md)
- [FAQs](faqs.md)
- [Troubleshooting](troubleshooting.md)
- [Community](community.md)
Expand Down
7 changes: 1 addition & 6 deletions docs/licenses.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
---
title: Licenses
hide_table_of_contents: true
---

Telepresence incorporates Free and Open Source software under the following licenses:
Telepresence CLI incorporates Free and Open Source software under the following licenses:

* [2-clause BSD license](https://opensource.org/licenses/BSD-2-Clause)
* [3-clause BSD license](https://opensource.org/licenses/BSD-3-Clause)
Expand Down
4 changes: 2 additions & 2 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ The version and status commands will now output the image that the traffic-agent
## <div style="display:flex;"><img src="images/feature.png" alt="feature" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">Custom DNS using the client DNS resolver.</div></div>
<div style="margin-left: 15px">

<p>A new <code>telepresence connect --proxy-via CIDR=WORKLOAD</code> flag was introduced, allowing Telepresence to translate DNS responses matching specific subnets into virtual IPs that are used locally. Those virtual IPs are then routed (with reverse translation) via the pod's of a given workload. This makes it possible to handle custom DNS servers that resolve domains into loopback IPs. The flag may also be used in cases where the cluster's subnets are in conflict with the workstation's VPN.</p> <p>The CIDR can also be a symbolic name that identifies a subnet or list of subnets:</p><table> <tr><td><code>also</code></td><td>All subnets added with --also-proxy</td></tr> <tr><td><code>service</code></td><td>The cluster's service subnet</td></tr> <tr><td><code>pods</code></td><td>The cluster's pod subnets.</td></tr> <tr><td><code>all</code></td><td>All of the above.</td></tr> </table>
<p>A new <code>telepresence connect --proxy-via CIDR=WORKLOAD</code> flag was introduced, allowing Telepresence to translate DNS responses matching specific subnets into virtual IPs that are used locally. Those virtual IPs are then routed (with reverse translation) via the pod's of a given workload. This makes it possible to handle custom DNS servers that resolve domains into loopback IPs. The flag may also be used in cases where the cluster's subnets are in conflict with the workstation's VPN.</p> <p>The CIDR can also be a symbolic name that identifies a subnet or list of subnets:</p><table><tbody> <tr><td><code>also</code></td><td>All subnets added with --also-proxy</td></tr> <tr><td><code>service</code></td><td>The cluster's service subnet</td></tr> <tr><td><code>pods</code></td><td>The cluster's pod subnets.</td></tr> <tr><td><code>all</code></td><td>All of the above.</td></tr> </tbody></table>
</div>

## <div style="display:flex;"><img src="images/bugfix.png" alt="bugfix" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">Ensure that agent.appProtocolStrategy is propagated correctly.</div></div>
Expand Down Expand Up @@ -516,7 +516,7 @@ The <code>kube-system</code> and <code>kube-node-lease</code> namespaces should
## <div style="display:flex;"><img src="images/bugfix.png" alt="bugfix" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">Backward compatibility for pod template TLS annotations.</div></div>
<div style="margin-left: 15px">

Users of Telepresence < 2.9.0 that make use of the pod template TLS annotations were unable to upgrade because the annotation names have changed (now prefixed by "telepresence."), and the environment expansion of the annotation values was dropped. This fix restores support for the old names (while retaining the new ones) and the environment expansion.
Users of Telepresence &lt; 2.9.0 that make use of the pod template TLS annotations were unable to upgrade because the annotation names have changed (now prefixed by "telepresence."), and the environment expansion of the annotation values was dropped. This fix restores support for the old names (while retaining the new ones) and the environment expansion.
</div>

## <div style="display:flex;"><img src="images/security.png" alt="security" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">Built with go 1.21.3</div></div>
Expand Down
6 changes: 5 additions & 1 deletion tools/src/relnotesgen/relnotes/relnotes.gomdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{- /*gotype: github.com/telepresenceio/telepresence/tools/src/relnotesgen/relnotes.ChangeLog*/ -}}
import { Note, Title, Body } from '@src/components/ReleaseNotes'
---
title: Release Notes
---

import { Note, Title, Body } from '@site/src/components/ReleaseNotes'

[comment]: # (Code generated by relnotesgen. DO NOT EDIT.)
{{ $styles := .Styles -}}
Expand Down
12 changes: 12 additions & 0 deletions tools/src/tocgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,24 @@ func (t *TOC) writeMarkdown(indent string, w io.Writer) (err error) {
return err
}

const frontMatter = `---
description: Main menu when using plain markdown. Excluded when generating the website
---
# <img src="images/logo.png" height="64px"/> Telepresence Documentation
raw markdown version, more bells and whistles at [telepresence.io](https://telepresence.io)
`

func makeTOC(input string) error {
ts, err := readTOC(input)
if err != nil {
return err
}
wr := bufio.NewWriter(os.Stdout)
_, err = wr.WriteString(frontMatter)
if err != nil {
return err
}
for _, c := range ts {
if err = c.writeMarkdown("", wr); err != nil {
return err
Expand Down

0 comments on commit 01aa30b

Please sign in to comment.