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

Move the helm chart to charts #1862

Merged
merged 4 commits into from
Apr 25, 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 .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ tests:
helm-chart:
- head-branch: ['^helm/', '^helm-chart/']
- changed-files:
- any-glob-to-any-file: ['deploy/helm-chart/**/*']
- any-glob-to-any-file: ['charts/**/*']
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ jobs:
- name: Deploy Kubernetes
id: k8s
run: |
kube_config=${{ github.workspace }}/deploy/helm-chart/kube-${{ github.run_id }}-helm
kube_config=${{ github.workspace }}/kube-${{ github.run_id }}-helm
make create-kind-cluster KIND_KUBE_CONFIG=${kube_config}
echo "KUBECONFIG=${kube_config}" >> "$GITHUB_ENV"
kind load docker-image ghcr.io/nginxinc/nginx-gateway-fabric:${{ steps.ngf-meta.outputs.version }} ghcr.io/nginxinc/nginx-gateway-fabric/nginx:${{ steps.nginx-meta.outputs.version }}
Expand All @@ -321,7 +321,7 @@ jobs:
--set nginx.image.pullPolicy=Never
--set service.type=NodePort
-n nginx-gateway
working-directory: ${{ github.workspace }}/deploy/helm-chart
working-directory: ${{ github.workspace }}/charts/nginx-gateway-fabric

publish-helm:
name: Package and Publish Helm Chart
Expand All @@ -345,7 +345,7 @@ jobs:
- name: Package
id: package
run: |
output=$(helm package ${{ github.ref_type != 'tag' && '--app-version edge --version 0.0.0-edge' || '' }} deploy/helm-chart)
output=$(helm package ${{ github.ref_type != 'tag' && '--app-version edge --version 0.0.0-edge' || '' }} charts/nginx-gateway-fabric)
echo "path=$(basename -- $(echo $output | cut -d: -f2))" >> $GITHUB_OUTPUT

- name: Push to GitHub Container Registry
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
id: vars
run: |
# TODO(lucacome): improve this and maybe use appVersion instead of version if we switch to tags
echo "current_version=$(yq '.version' <deploy/helm-chart/Chart.yaml)" >> $GITHUB_OUTPUT
echo "current_version=$(yq '.version' <charts/nginx-gateway-fabric/Chart.yaml)" >> $GITHUB_OUTPUT

- name: Find and Replace
uses: jacobtomlinson/gha-find-replace@a51bbcd94d000df9ca0fcb54ec8be69aad8374b0 # v3.0.2
Expand All @@ -50,23 +50,23 @@ jobs:
with:
find: "edge"
replace: ${{ inputs.version }}
include: "deploy/helm-chart/*.yaml"
include: "charts/nginx-gateway-fabric/*.yaml"
regex: false

- name: Find and Replace
uses: jacobtomlinson/gha-find-replace@a51bbcd94d000df9ca0fcb54ec8be69aad8374b0 # v3.0.2
with:
find: ${{ steps.vars.outputs.current_version }}
replace: ${{ inputs.version }}
include: "deploy/helm-chart/*.yaml"
include: "charts/nginx-gateway-fabric/*.yaml"
regex: false

- name: Find and Replace
uses: jacobtomlinson/gha-find-replace@a51bbcd94d000df9ca0fcb54ec8be69aad8374b0 # v3.0.2
with:
find: "Always"
replace: "IfNotPresent"
include: "deploy/helm-chart/*.yaml"
include: "charts/nginx-gateway-fabric/*.yaml"
regex: false

- name: Generate manifests and changelog
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents]
exclude: (^deploy/helm-chart/templates)
exclude: (^charts/nginx-gateway-fabric/templates)
- id: check-added-large-files
- id: check-merge-conflict
- id: check-case-conflict
Expand Down
2 changes: 1 addition & 1 deletion .yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ yaml-files:
- "*.yml"

ignore:
- deploy/helm-chart/templates/
- charts/nginx-gateway-fabric
- config/crd/bases/
- .github/workflows/

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VERSION = edge
GIT_COMMIT = $(shell git rev-parse HEAD || echo "unknown")
DATE = $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
MANIFEST_DIR = $(CURDIR)/deploy/manifests
CHART_DIR = $(CURDIR)/deploy/helm-chart
CHART_DIR = $(CURDIR)/charts/nginx-gateway-fabric
NGINX_CONF_DIR = internal/mode/static/nginx/conf
NJS_DIR = internal/mode/static/nginx/modules/src
NGINX_DOCKER_BUILD_PLUS_ARGS = --secret id=nginx-repo.crt,src=nginx-repo.crt --secret id=nginx-repo.key,src=nginx-repo.key
Expand Down Expand Up @@ -194,12 +194,12 @@ install-ngf-local-build-with-plus: build-images-with-plus load-images-with-plus
.PHONY: helm-install-local
helm-install-local: ## Helm install NGF on configured kind cluster with local images. To build, load, and install with helm run make install-ngf-local-build.
./conformance/scripts/install-gateway.sh $(GW_API_VERSION) $(INSTALL_WEBHOOK)
helm install dev ./deploy/helm-chart --create-namespace --wait --set service.type=NodePort --set nginxGateway.image.repository=$(PREFIX) --set nginxGateway.image.tag=$(TAG) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=$(NGINX_PREFIX) --set nginx.image.tag=$(TAG) --set nginx.image.pullPolicy=Never -n nginx-gateway
helm install dev $(CHART_DIR) --create-namespace --wait --set service.type=NodePort --set nginxGateway.image.repository=$(PREFIX) --set nginxGateway.image.tag=$(TAG) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=$(NGINX_PREFIX) --set nginx.image.tag=$(TAG) --set nginx.image.pullPolicy=Never -n nginx-gateway

.PHONY: helm-install-local-with-plus
helm-install-local-with-plus: ## Helm install NGF with NGINX Plus on configured kind cluster with local images. To build, load, and install with helm run make install-ngf-local-build-with-plus.
./conformance/scripts/install-gateway.sh $(GW_API_VERSION) $(INSTALL_WEBHOOK)
helm install dev ./deploy/helm-chart --create-namespace --wait --set service.type=NodePort --set nginxGateway.image.repository=$(PREFIX) --set nginxGateway.image.tag=$(TAG) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=$(NGINX_PLUS_PREFIX) --set nginx.image.tag=$(TAG) --set nginx.image.pullPolicy=Never --set nginx.plus=true -n nginx-gateway
helm install dev $(CHART_DIR) --create-namespace --wait --set service.type=NodePort --set nginxGateway.image.repository=$(PREFIX) --set nginxGateway.image.tag=$(TAG) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=$(NGINX_PLUS_PREFIX) --set nginx.image.tag=$(TAG) --set nginx.image.pullPolicy=Never --set nginx.plus=true -n nginx-gateway

# Debug Targets
.PHONY: debug-build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ type: application
version: 1.2.0
appVersion: "edge"
home: https://github.com/nginxinc/nginx-gateway-fabric
icon: https://raw.githubusercontent.com/nginxinc/nginx-gateway-fabric/main/deploy/helm-chart/chart-icon.png
icon: https://raw.githubusercontent.com/nginxinc/nginx-gateway-fabric/main/charts/nginx-gateway-fabric/chart-icon.png
sources:
- https://github.com/nginxinc/nginx-gateway-fabric/tree/main/deploy/helm-chart
- https://github.com/nginxinc/nginx-gateway-fabric/tree/main/charts/nginx-gateway-fabric
keywords:
- kubernetes
- gateway
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/developer/implementing-a-feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ practices to ensure a successful feature development process.
- **Installation Changes**: If your feature involves changes to the installation process of NGF, update
the [installation](/site/content/how-to/installation/installation.md) documentation.
- **Helm Changes**: If your feature introduces or changes any values of the NGF Helm Chart, update the
[Helm README](/deploy/helm-chart/README.md).
[Helm README](/charts/nginx-gateway-fabric/README.md).
- **Command-line Changes**: If your feature introduces or changes a command-line flag or subcommand, update
the [cli help](/site/content/reference/cli-help.md) documentation.
- **Other Documentation Updates**: For any other changes that affect the behavior, usage, or configuration of NGF,
Expand Down
6 changes: 3 additions & 3 deletions docs/developer/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,16 @@ This will build the docker images `nginx-gateway-fabric:<your-user>` and `nginx-
- To install with Helm (where your release name is `my-release`):

```shell
helm install my-release ./deploy/helm-chart --create-namespace --wait --set service.type=NodePort --set nginxGateway.image.repository=nginx-gateway-fabric --set nginxGateway.image.tag=$(whoami) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=nginx-gateway-fabric/nginx --set nginx.image.tag=$(whoami) --set nginx.image.pullPolicy=Never -n nginx-gateway
helm install my-release ./charts/nginx-gateway-fabric --create-namespace --wait --set service.type=NodePort --set nginxGateway.image.repository=nginx-gateway-fabric --set nginxGateway.image.tag=$(whoami) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=nginx-gateway-fabric/nginx --set nginx.image.tag=$(whoami) --set nginx.image.pullPolicy=Never -n nginx-gateway
```

- To install NGINX Plus with Helm (where your release name is `my-release`):

```shell
helm install my-release ./deploy/helm-chart --create-namespace --wait --set service.type=NodePort --set nginxGateway.image.repository=nginx-gateway-fabric --set nginxGateway.image.tag=$(whoami) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=nginx-gateway-fabric/nginx-plus --set nginx.image.tag=$(whoami) --set nginx.image.pullPolicy=Never --set nginx.plus=true -n nginx-gateway
helm install my-release ./charts/nginx-gateway-fabric --create-namespace --wait --set service.type=NodePort --set nginxGateway.image.repository=nginx-gateway-fabric --set nginxGateway.image.tag=$(whoami) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=nginx-gateway-fabric/nginx-plus --set nginx.image.tag=$(whoami) --set nginx.image.pullPolicy=Never --set nginx.plus=true -n nginx-gateway
```

> For more information on Helm configuration options see the Helm [README](../../deploy/helm-chart/README.md).
> For more information on Helm configuration options see the Helm [README](../../charts/nginx-gateway-fabric/README.md).

- To install with manifests:

Expand Down
2 changes: 1 addition & 1 deletion site/content/how-to/monitoring/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ You can configure monitoring metrics for NGINX Gateway Fabric using Helm or Mani

### Using Helm

If you're setting up NGINX Gateway Fabric with Helm, you can adjust the `metrics.*` parameters to fit your needs. For detailed options and instructions, see the [Helm README](/deploy/helm-chart/README.md).
If you're setting up NGINX Gateway Fabric with Helm, you can adjust the `metrics.*` parameters to fit your needs. For detailed options and instructions, see the [Helm README](/charts/nginx-gateway-fabric/README.md).

### Using Kubernetes manifests

Expand Down
2 changes: 1 addition & 1 deletion site/content/installation/installing-ngf/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ Follow these steps to uninstall NGINX Gateway Fabric and Gateway API from your K

## Additional configuration

For a full list of the Helm Chart configuration parameters, read [the NGINX Gateway Fabric Helm Chart](https://github.com/nginxinc/nginx-gateway-fabric/blob/v1.2.0/deploy/helm-chart/README.md#configuration).
For a full list of the Helm Chart configuration parameters, read [the NGINX Gateway Fabric Helm Chart](https://github.com/nginxinc/nginx-gateway-fabric/blob/v1.2.0/charts/nginx-gateway-fabric/README.md#configuration).

## Next steps

Expand Down
2 changes: 1 addition & 1 deletion site/content/overview/gateway-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The following list describes the connections, preceeded by their types in parent

1. (HTTPS)
- Read: _NGF_ reads the _Kubernetes API_ to get the latest versions of the resources in the cluster.
- Write: _NGF_ writes to the _Kubernetes API_ to update the handled resources' statuses and emit events. If there's more than one replica of _NGF_ and [leader election](https://github.com/nginxinc/nginx-gateway-fabric/tree/v1.2.0/deploy/helm-chart#configuration) is enabled, only the _NGF_ pod that is leading will write statuses to the _Kubernetes API_.
- Write: _NGF_ writes to the _Kubernetes API_ to update the handled resources' statuses and emit events. If there's more than one replica of _NGF_ and [leader election](https://github.com/nginxinc/nginx-gateway-fabric/tree/v1.2.0/charts/nginx-gateway-fabric#configuration) is enabled, only the _NGF_ pod that is leading will write statuses to the _Kubernetes API_.
1. (HTTP, HTTPS) _Prometheus_ fetches the `controller-runtime` and NGINX metrics via an HTTP endpoint that _NGF_ exposes (`:9113/metrics` by default). Prometheus is **not** required by NGINX Gateway Fabric, and its endpoint can be turned off.
1. (File I/O)
- Write: _NGF_ generates NGINX _configuration_ based on the cluster resources and writes them as `.conf` files to the mounted `nginx-conf` volume, located at `/etc/nginx/conf.d`. It also writes _TLS certificates_ and _keys_ from [TLS secrets](https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets) referenced in the accepted Gateway resource to the `nginx-secrets` volume at the path `/etc/nginx/secrets`.
Expand Down
2 changes: 1 addition & 1 deletion tests/suite/system_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func getDefaultSetupCfg() setupConfig {
_, file, _, _ := runtime.Caller(0)
fileDir := path.Join(path.Dir(file), "../")
basepath := filepath.Dir(fileDir)
localChartPath = filepath.Join(basepath, "deploy/helm-chart")
localChartPath = filepath.Join(basepath, "charts/nginx-gateway-fabric")

return setupConfig{
releaseName: releaseName,
Expand Down
Loading