Skip to content

Commit 4265d08

Browse files
authored
Merge pull request #3538 from replicatedhq/remove-bitnami-examples
remove bitnami example
2 parents c8d6573 + 9ce91ab commit 4265d08

File tree

7 files changed

+25
-204
lines changed

7 files changed

+25
-204
lines changed

docs/partials/application-links/_nginx-service.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
labels:
77
app: nginx
88
annotations:
9-
kots.io/when: '{{repl not IsKurl }}'
9+
kots.io/when: 'repl{{ and (ne Distribution "embedded-cluster") (ne Distribution "kurl")}}'
1010
spec:
1111
type: ClusterIP
1212
ports:
@@ -21,7 +21,7 @@ metadata:
2121
labels:
2222
app: nginx
2323
annotations:
24-
kots.io/when: '{{repl IsKurl }}'
24+
kots.io/when: 'repl{{ or (eq Distribution "embedded-cluster") (eq Distribution "kurl")}}'
2525
spec:
2626
type: NodePort
2727
ports:

docs/partials/helm/_helm-cr-exclude.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ When Replicated KOTS processes Helm charts, it excludes the entire chart if the
44

55
For more information about optional charts, template functions, and how KOTS processes Helm charts, see:
66

7-
* [Optional Charts](/vendor/helm-optional-charts)
87
* [About Template Function Contexts](template-functions-about)
98
* [About Distributing Helm Charts with KOTS](/vendor/helm-native-about)

docs/reference/template-functions-examples.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,5 +439,4 @@ The following topics include additional examples of using KOTS template function
439439

440440
* [Add Status Informers](/vendor/admin-console-display-app-status#add-status-informers) in _Adding Resource Status Informers_
441441
* [Conditionally Including or Excluding Resources](/vendor/packaging-include-resources)
442-
* [Example: Including Optional Helm Charts](/vendor/helm-optional-charts)
443442
* [Templating Annotations](/vendor/resources-annotations-templating)

docs/vendor/admin-console-port-forward.mdx

Lines changed: 18 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import Tabs from '@theme/Tabs';
22
import TabItem from '@theme/TabItem';
33
import ServicePortNote from "../partials/custom-resource-application/_servicePort-note.mdx"
4-
import GiteaKotsApp from "../partials/getting-started/_gitea-kots-app-cr.mdx"
5-
import GiteaHelmChart from "../partials/getting-started/_gitea-helmchart-cr.mdx"
6-
import GiteaK8sApp from "../partials/getting-started/_gitea-k8s-app-cr.mdx"
74
import PortsApplicationURL from "../partials/custom-resource-application/_ports-applicationURL.mdx"
85
import NginxKotsApp from "../partials/application-links/_nginx-kots-app.mdx"
96
import NginxK8sApp from "../partials/application-links/_nginx-k8s-app.mdx"
107
import NginxService from "../partials/application-links/_nginx-service.mdx"
118
import NginxDeployment from "../partials/application-links/_nginx-deployment.mdx"
9+
import EcCr from "../partials/getting-started/_slackernews-embedded-cluster.mdx"
1210

1311
# Port Forward Services with KOTS
1412

@@ -162,61 +160,18 @@ The following example shows an **Open App** link on the dashboard of the Admin C
162160

163161
[View a larger version of this image](/images/gitea-open-app.png)
164162

165-
## Examples
163+
## Example: NGINX Application with ClusterIP and NodePort Services
166164

167-
This section provides examples of how to configure the `ports` key to port-forward a service in existing cluster installations and add links to services on the Admin Console dashboard.
168-
169-
### Example: Bitnami Gitea Helm Chart with LoadBalancer Service
170-
171-
This example uses a KOTS Application custom resource and a Kubernetes SIG Application custom resource to configure port forwarding for the Bitnami Gitea Helm chart in existing cluster installations, and add a link to the port-forwarded service on the Admin Console dashboard. To view the Gitea Helm chart source, see [bitnami/gitea](https://github.com/bitnami/charts/blob/main/bitnami/gitea) in GitHub.
165+
The following example demonstrates how to link to a port-forwarded ClusterIP service for existing cluster KOTS installations. It also shows how to use the `ports` key to add a link to a NodePort service for Embedded Cluster or kURL installations. Although the primary purpose of the `ports` key is to port forward services for existing cluster KOTS installations, it is also possible to use the `ports` key so that links to NodePort services for Embedded Cluster or kURL installations use the hostname in the browser. For information about exposing NodePort services for Embedded Cluster or kURL installations, see [Exposing Services Using NodePorts](kurl-nodeport-services).
172166

173167
To test this example:
174168

175-
1. Pull version 1.0.6 of the Gitea Helm chart from Bitnami:
176-
177-
```
178-
helm pull oci://registry-1.docker.io/bitnamicharts/gitea --version 1.0.6
179-
```
180-
181-
1. Add the `gitea-1.0.6.tgz` chart archive to a new, empty release in the Vendor Portal along with the `kots-app.yaml`, `k8s-app.yaml`, and `gitea.yaml` files provided below. Promote to the channel that you use for internal testing. For more information, see [Manage Releases with the Vendor Portal](releases-creating-releases).
182-
183-
<Tabs>
184-
<TabItem value="kots-app" label="kots-app.yaml" default>
185-
<h5>Description</h5>
186-
<p>Based on the <a href="https://github.com/bitnami/charts/blob/main/bitnami/gitea/templates/svc.yaml">templates/svc.yaml</a> and <a href="https://github.com/bitnami/charts/blob/main/bitnami/gitea/values.yaml">values.yaml</a> files in the Gitea Helm chart, the following KOTS Application custom resource adds port 3000 to the port forward tunnel and maps local port 8888. Port 3000 is the container port of the Pod where the <code>gitea</code> service runs.</p>
187-
<h5>YAML</h5>
188-
<GiteaKotsApp/>
189-
</TabItem>
190-
<TabItem value="k8s-app" label="k8s-app.yaml" default>
191-
<h5>Description</h5>
192-
<p>The Kubernetes Application custom resource lists the same URL as the `ports.applicationUrl` field in the KOTS Application custom resource (`"http://nginx"`). This adds a link to the port-forwarded service from the Admin Console dashboard. It also triggers KOTS to rewrite the URL to use the hostname in the browser and append the specified `localPort`. The label to be used for the link in the Admin Console is "Open App".</p>
193-
<h5>YAML</h5>
194-
<GiteaK8sApp/>
195-
</TabItem>
196-
<TabItem value="helmchart" label="gitea.yaml" default>
197-
<h5>Description</h5>
198-
<p>The KOTS HelmChart custom resource provides instructions to KOTS about how to deploy the Helm chart. The <code>name</code> and <code>chartVersion</code> listed in the HelmChart custom resource must match the name and version of a Helm chart archive in the release. Each Helm chart archive in a release requires a unique HelmChart custom resource.</p>
199-
<h5>YAML</h5>
200-
<GiteaHelmChart/>
201-
</TabItem>
202-
</Tabs>
203-
204-
1. Install the release to confirm that the service was port-forwarded successfully. To test the port forward, click **Open App** on the Admin Console dashboard after the application reaches a Ready state. For more information, see [Online Installation in Existing Clusters with KOTS](/enterprise/installing-existing-cluster).
205-
206-
### Example: NGINX Application with ClusterIP and NodePort Services
207-
208-
The following example demonstrates how to link to a port-forwarded ClusterIP service for existing cluster installations.
209-
210-
It also shows how to use the `ports` key to add a link to a NodePort service for kURL installations. Although the primary purpose of the `ports` key is to port forward services for existing cluster installations, it is also possible to use the `ports` key so that links to NodePort services for Embedded Cluster or kURL installations use the hostname in the browser. For information about exposing NodePort services for Embedded Cluster or kURL installations, see [Exposing Services Using NodePorts](kurl-nodeport-services).
211-
212-
To test this example:
213-
214-
1. Add the `example-service.yaml`, `example-deployment.yaml`, `kots-app.yaml`, and `k8s-app.yaml` files provided below to a new, empty release in the Vendor Portal. Promote to the channel that you use for internal testing. For more information, see [Manage Releases with the Vendor Portal](releases-creating-releases).
169+
1. Add the `example-service.yaml`, `example-deployment.yaml`, `kots-app.yaml`, `k8s-app.yaml`, and `embedded-cluster.yaml` files provided below to a new, empty release in the Vendor Portal. Promote to the channel that you use for internal testing. For more information, see [Manage Releases with the Vendor Portal](releases-creating-releases).
215170

216171
<Tabs>
217172
<TabItem value="service" label="example-service.yaml" default>
218173
<h5>Description</h5>
219-
<p>The YAML below contains ClusterIP and NodePort specifications for a service named <code>nginx</code>. Each specification uses the <code>kots.io/when</code> annotation with the Replicated IsKurl template function to conditionally include the service based on the installation type (existing cluster or kURL cluster). For more information, see <a href="/vendor/packaging-include-resources">Conditionally Including or Excluding Resources</a> and <a href="/reference/template-functions-static-context#iskurl">IsKurl</a>.</p>
174+
<p>The YAML below contains ClusterIP and NodePort specifications for a service named <code>nginx</code>. Each specification uses the <code>kots.io/when</code> annotation with the Replicated <a href="/reference/template-functions-static-context#distribution">Distribution</a> template function to conditionally include the service based on the installation type (existing cluster or Embedded Cluster/kURL cluster). For more information, see <a href="/vendor/packaging-include-resources">Conditionally Including or Excluding Resources</a>.</p>
220175
<p>As shown below, both the ClusterIP and NodePort <code>nginx</code> services are exposed on port 80.</p>
221176
<h5>YAML</h5>
222177
<NginxService/>
@@ -239,14 +194,24 @@ To test this example:
239194
<h5>YAML</h5>
240195
<NginxK8sApp/>
241196
</TabItem>
197+
<TabItem value="embedded" label="embedded-cluster.yaml" default>
198+
<h5>Description</h5>
199+
<p>To install your application with Embedded Cluster, an Embedded Cluster Config must be present in the release. At minimum, the Embedded Cluster Config sets the version of Embedded Cluster that will be installed. You can also define several characteristics about the cluster.</p>
200+
<h5>YAML</h5>
201+
<EcCr/>
202+
</TabItem>
242203
</Tabs>
243204

244205
1. Install the release into an existing cluster and confirm that the service was port-forwarded successfully by clicking **Open App** on the Admin Console dashboard. For more information, see [Online Installation in Existing Clusters with KOTS](/enterprise/installing-existing-cluster).
245206

246-
1. If there is not already a kURL installer promoted to the channel, add a kURL installer to the release to support kURL installs. For more information, see [Create a kURL Installer](/vendor/packaging-embedded-kubernetes).
247-
248-
1. Install the release on a VM and confirm that the service was exposed successfully. To test the port forward, click **Open App** on the Admin Console dashboard after the application reaches a Ready state. For more information, see [Online Installation with kURL](/enterprise/installing-kurl).
207+
1. Install the release on a VM and confirm that you can open the application by clicking **Open App** on the Admin Console dashboard. For more information, see [Online Installation with Embedded Cluster](/enterprise/installing-embedded) or [Online Installation with kURL](/enterprise/installing-kurl).
249208

250209
:::note
251210
Ensure that the VM where you install allows HTTP traffic.
211+
:::
212+
213+
:::note
214+
If you used Replicated Compatibility Matrix to create the VM, follow the steps in [Expose Ports on Running VMs](/vendor/testing-vm-create#expose-ports-on-running-vms) to add these DNS records to the VM:
215+
* A DNS record with a **Target Port** of **30000** to get a hostname where you can access the Admin Console
216+
* A DNS record with a **Target Port** of **8888** to get a hostname where you can access the NGINX application
252217
:::

docs/vendor/helm-optional-charts.md

Lines changed: 0 additions & 145 deletions
This file was deleted.

netlify.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@
7373

7474
[[redirects]]
7575
from = "https://docs.replicated.com/vendor/helm-chart-components"
76-
to = "https://docs.replicated.com/vendor/helm-optional-charts"
76+
to = "https://docs.replicated.com/vendor/packaging-include-resources"
77+
78+
[[redirects]]
79+
from = "https://docs.replicated.com/vendor/helm-optional-charts"
80+
to = "https://docs.replicated.com/vendor/packaging-include-resources"
7781

7882
[[redirects]]
7983
from = "https://docs.replicated.com/vendor/packaging-custom-resources"

sidebars.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ const sidebars = {
305305
label: 'Conditionally Deploy Resources',
306306
items: [
307307
'vendor/packaging-include-resources',
308-
'vendor/helm-optional-charts',
309308
'vendor/tutorial-adding-db-config',
310309
],
311310
},

0 commit comments

Comments
 (0)