Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: added README-template and README-example files #50

Merged
merged 2 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ By contributing to this repository, you acknowledge that you have read and agree

## Pull Request guidelines
* Be sure to test your functionality by uploading the pack to your own pack registry before raising the pull request.
* Please give a brief account of the pack functionality. You can add usage instructions and document the nuances for using the pack as part of the README.md file within the pack.
* Use the [README template](templates/README-template.md) to create a README.md file for your pack that includes a brief overview of the pack functionality, prerequisites, and usage instructions. Each pack version should have its own README.md file. An [example README.md](templates/README-example.md) is also available to provide you with a better understanding of the structure and content you need to include.
* Mention the list of container images being used by your pack as part images section in values.yaml file of the pack. This will help us in identifying the images to run security scans.
* Typically you should get a response within 72 hours of raising your pull request. Make sure you watchout for any review comments and handle them.
* Once your PR is merged, it will be deployed to the Spectro Cloud public pack registry.
Expand Down
86 changes: 86 additions & 0 deletions templates/README-example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# ngrok

The ngrok [Ingress Controller for Kubernetes](https://github.com/ngrok/kubernetes-ingress-controller) adds public and secure ingress traffic to Kubernetes applications. This open-source [Ingress Controller](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers) works with Palette to provide ingress to your applications, APIs, or other resources while also offloading network ingress and middleware execution to ngrok's platform.


## Prerequisites

- An active [ngrok account](https://ngrok.com/signup).
- An ngrok authentication token. You can find your token in the dashboard. Visit the [Your Authtoken](https://dashboard.ngrok.com/get-started/your-authtoken) section to review your access token.
- An ngrok API key. You can generate an API key from the ngrok dashboard. Visit the [API section](https://dashboard.ngrok.com/api) of the dashboard to review existing keys.
- A static subdomain. You can obtain a static subdomain by navigating to the [**Domains**](https://dashboard.ngrok.com/cloud-edge/domains) section of the ngrok dashboard and clicking on **Create Domain** or **New Domain**.


## Parameters

To deploy the ngrok Ingress Controller, you need to set, at minimum, the following parameters in the pack's YAML.

| Name | Description | Type | Default Value | Required |
| --- | --- | --- | --- | --- |
| `kubernetes-ingress-controller.credentials.apiKey` | Your ngrok API key for this application and domain. | String | - | Yes |
| `kubernetes-ingress-controller.credentials.authtoken` | The authentication token for your active ngrok account. | String | - | Yes |
| `kubernetes-ingress-controller.rules.host` | A static subdomain hosted by ngrok and associated with your account. | String | - | Yes |


Review the [common overrides](https://github.com/ngrok/kubernetes-ingress-controller/blob/main/docs/deployment-guide/common-helm-k8s-overrides.md) document for more details on parameters. Refer to the [user guide](https://github.com/ngrok/kubernetes-ingress-controller/tree/main/docs/user-guide) for advanced configurations.

> [!CAUTION]
>If you have a free ngrok account, you can only have one ngrok agent >active at a time. This means that you will need to set the number of >replicas to `1` to ensure that your ngrok agent operates properly.
>```yaml
>charts:
> kubernetes-ingress-controller:
> replicaCount: 1
>```

## Upgrade

This version of the pack changes the ownership model for https edge and tunnel Custom Resources (CRs). Issue the [`migrate-edges.sh`](https://github.com/ngrok/kubernetes-ingress-controller/blob/main/scripts/migrate-edges.sh) and [`migrate-tunnels.sh`](https://github.com/ngrok/kubernetes-ingress-controller/blob/main/scripts/migrate-tunnels.sh) scripts before using the new version to ease the transition to the new ownership.


## Usage

To use the ngrok Ingress Controller pack, first create a new [add-on cluster profile](https://docs.spectrocloud.com/profiles/cluster-profiles/create-cluster-profiles/create-addon-profile/), search for the **ngrok** Ingress Controller pack, and overwrite the default pack configuration with your API key and authentication token like the following example YAML content:

```yaml
charts:
kubernetes-ingress-controller:
...
credentials:
apiKey: API_KEY
authtoken: AUTHTOKEN
```

Next, you must create an ingress service definition for your application, which requires a new manifest layer. Click on the **Add Manifest** button to create a new manifest layer.

The following YAML content demonstrates an example ingress service where the ngrok Ingress Controller creates a new edge to route traffic on your ngrok subdomain `example.com` to an existing `example-app` deployed on your Kubernetes cluster in Palette.

```yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
namespace: ngrok-ingress-controller
spec:
ingressClassName: ngrok
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: example-app
port:
number: 80
```

Once you have defined the ngrok Ingress Controller pack, you can add it to an existing cluster profile, as an add-on profile, or as a new add-on layer to a deployed cluster.


## References

- [Ingress Controller for Kubernetes on GitHub](https://github.com/ngrok/kubernetes-ingress-controller)
- [ngrok documentation](https://ngrok.com/docs/)
- [Get started with the ngrok Ingress Controller for Kubernetes](https://ngrok.com/docs/using-ngrok-with/k8s/)
- [ngrok Ingress Controller Helm Documentation](https://github.com/ngrok/kubernetes-ingress-controller/tree/main/docs)
62 changes: 62 additions & 0 deletions templates/README-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Title <!-- It must be the pack’s name -->

<!-- A brief overview of the application or service the pack provides. -->


## Prerequisites

<!-- List the required software version or hardware the user is required to have installed and available in order to integrate the pack. -->


## Parameters

<!-- If applicable, list and describe only the most commonly used parameters, especially if there are 10 or more that might apply.

You can use a table to list parameters with a **Parameter** and a **Description** column. Additionally, include a **Type** column to specify the parameter's type and a **Default Value** column for the parameter's default values. Last, you can include a **Required** column to indicate that the user must provide a value for it.

| **Parameter** | **Description** | **Type** | **Default Value** | **Required** |
|---|---|---|---|---|
| Parameter 1 | Description for Parameter 1 | String | “always” | Yes |
| Parameter 2 | Description for Parameter 2 | Int | 10 | No |

-->


## Upgrade

<!-- If applicable, provide instructions on upgrading the pack's version. These instructions should include any prerequisites that are necessary for the upgrade, as well as a step-by-step upgrade guide. Additionally, you can highlight any changes specific to the new version, compatibility issues, and instructions on rolling back an upgrade if needed. The upgrade nuances can be structured in bullets, such as the examples listed below.

- The upgrade to version x.x.x of this pack removes support for installing feature X. We recommend installing feature X separately.
- The `example` key is no longer hard-coded. Therefore, the user does not need to input the key.
Software X API version was updated to v2 and now requires software Y version x.x.x or above.
- The `example` image was migrated to a "non-root" user approach. You can revert this behavior by setting the parameters `x`, `y`, and `z` to `root`.
- Backwards compatibility is no longer supported. Use the workaround below to upgrade from versions previous to x.x.x.
- When upgrading from the major version x.x.x, be aware that there is an incompatible breaking change that requires manual actions. Use the workaround provided below.
- The config `example values` has been refactored. All the values have been moved to the key `exampleKey`, and the limits can now be set separately.

> [!CAUTION]
> Upgrades from a manifest-based pack to a Helm chart-based pack might not be compatible. -->


## Usage

<!-- Provide instructions for the user to add the pack and configure essential settings. If there are any specific configurations users should be aware of, explain them in detail and use examples if possible. In summary, the usage section should provide a practical demonstration of how to use the pack. This could involve specifying parameters, creating extra layers, or interacting with other components or services, such as the use cases described below.

- How to handle dependencies.
Example - when using the [Prometheus](https://docs.spectrocloud.com/integrations/prometheus-operator/) pack, Grafana can be utilized to visualize the metrics scrapped by Prometheus.
- How to acquire credentials.
Example - when deploying the [Vault](https://docs.spectrocloud.com/integrations/vault/) pack, you need to get the root token.
- How to connect to an exposed UI or dashboard.
Example - when using the [Kubernetes Dashboard](https://docs.spectrocloud.com/integrations/kubernetes-dashboard/) pack, use the port-forward command to expose and access the dashboard at a specific port from your localhost.
- How to add and integrate an extra layer.
Example - when using the [ngrok](https://docs.spectrocloud.com/integrations/ngrok) pack, you need to create an ingress service definition for your application, which requires a new manifest layer.

> [!CAUTION]
> Call-out notes must follow the GitHub Flavored Markdown syntax. -->


## References

<!-- List one or more sources users can reference to learn more about the pack. References can comprise the official application or service documentation, a dedicated tutorial, the Helm Chart documentation, and more.
References must be in a bullet list that adheres to the standard MarkDown link format.
- [link_label](https://link) -->