Skip to content

Updating references for public name #92

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

Merged
merged 1 commit into from
Apr 1, 2022
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/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Describe the use case and detail of the change. If this PR addresses an issue on
### Checklist
Before creating a PR, run through this checklist and mark each as complete.

- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/nginx-gateway-kubernetes/blob/main/CONTRIBUTING.md) doc
- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/main/CONTRIBUTING.md) doc
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have checked that all unit tests pass after adding my changes
- [ ] I have updated necessary documentation
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/build/.out/gateway
key: nginx-gateway-kubernetes-${{ github.run_id }}-${{ github.run_number }}
key: nginx-kubernetes-gateway-${{ github.run_id }}-${{ github.run_number }}

build:
name: Build Image
Expand All @@ -114,7 +114,7 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/build/.out/gateway
key: nginx-gateway-kubernetes-${{ github.run_id }}-${{ github.run_number }}
key: nginx-kubernetes-gateway-${{ github.run_id }}-${{ github.run_number }}
- name: Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build Image Debian
Expand All @@ -126,7 +126,7 @@ jobs:
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: nginx/nginx-gateway-kubernetes:${{ needs.vars.outputs.sha }}
tags: nginx/nginx-kubernetes-gateway:${{ needs.vars.outputs.sha }}
build-args: |
VERSION=${{ needs.vars.outputs.version }}
GIT_COMMIT=${{ needs.vars.outputs.sha }}
Expand All @@ -135,20 +135,20 @@ jobs:
uses: aquasecurity/trivy-action@0.2.2
continue-on-error: true
with:
image-ref: nginx/nginx-gateway-kubernetes:${{ needs.vars.outputs.sha }}
image-ref: nginx/nginx-kubernetes-gateway:${{ needs.vars.outputs.sha }}
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results-nginx-gateway-kubernetes.sarif'
output: 'trivy-results-nginx-kubernetes-gateway.sarif'
ignore-unfixed: 'true'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v1
continue-on-error: true
with:
sarif_file: 'trivy-results-nginx-gateway-kubernetes.sarif'
sarif_file: 'trivy-results-nginx-kubernetes-gateway.sarif'
- name: Upload Scan Results
uses: actions/upload-artifact@v2
continue-on-error: true
with:
name: 'trivy-results-nginx-gateway-kubernetes.sarif'
path: 'trivy-results-nginx-gateway-kubernetes.sarif'
name: 'trivy-results-nginx-kubernetes-gateway.sarif'
path: 'trivy-results-nginx-kubernetes-gateway.sarif'
if: always()
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The following is a set of guidelines for contributing to NGINX Kubernetes Gatewa
* [Git Style Guide](#git-style-guide)
* [Go Style Guide](#go-style-guide)

[Code of Conduct](https://github.com/nginxinc/nginx-gateway-kubernetes/blob/master/CODE_OF_CONDUCT.md)
[Code of Conduct](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/master/CODE_OF_CONDUCT.md)

[Contributor License Agreement](#contributor-license-agreement)

Expand Down Expand Up @@ -50,7 +50,7 @@ To suggest an enhancement, please create an issue on GitHub with the label `enha
### Open a Pull Request

* Fork the repo, create a branch, submit a PR when your changes are tested and ready for review
* Fill in [our pull request template](https://github.com/nginxinc/nginx-gateway-kubernetes/blob/main/.github/PULL_REQUEST_TEMPLATE.md)
* Fill in [our pull request template](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/main/.github/PULL_REQUEST_TEMPLATE.md)

Note: if you’d like to implement a new feature, please consider creating a feature request issue first to start a discussion about the feature.

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 0.0.1
TAG = $(VERSION)
PREFIX ?= nginx-gateway
PREFIX ?= nginx-kubernetes-gateway

GIT_COMMIT = $(shell git rev-parse HEAD)
DATE = $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
Expand All @@ -19,7 +19,7 @@ container: build
.PHONY: build
build:
ifeq (${TARGET},local)
CGO_ENABLED=0 GOOS=linux go build -trimpath -a -ldflags "-s -w -X main.version=${VERSION} -X main.commit=${GIT_COMMIT} -X main.date=${DATE}" -o $(OUT_DIR)/gateway github.com/nginxinc/nginx-gateway-kubernetes/cmd/gateway
CGO_ENABLED=0 GOOS=linux go build -trimpath -a -ldflags "-s -w -X main.version=${VERSION} -X main.commit=${GIT_COMMIT} -X main.date=${DATE}" -o $(OUT_DIR)/gateway github.com/nginxinc/nginx-kubernetes-gateway/cmd/gateway
endif

.PHONY: generate
Expand Down Expand Up @@ -71,7 +71,7 @@ vet: ## Run go vet against code.

.PHONY: lint
lint: ## Run golangci-lint against code.
docker run --pull always --rm -v $(shell pwd):/nginx-gateway-kubernetes -w /nginx-gateway-kubernetes -v $(shell go env GOCACHE):/cache/go -e GOCACHE=/cache/go -e GOLANGCI_LINT_CACHE=/cache/go -v $(shell go env GOPATH)/pkg:/go/pkg golangci/golangci-lint:latest golangci-lint --color always run
docker run --pull always --rm -v $(shell pwd):/nginx-kubernetes-gateway -w /nginx-kubernetes-gateway -v $(shell go env GOCACHE):/cache/go -e GOCACHE=/cache/go -e GOLANGCI_LINT_CACHE=/cache/go -v $(shell go env GOPATH)/pkg:/go/pkg golangci/golangci-lint:latest golangci-lint --color always run

.PHONY: unit-test
unit-test:
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B5618%2Fgithub.com%2Fnginxinc%2Fnginx-gateway-kubernetes.svg?type=shield)](https://app.fossa.com/projects/custom%2B5618%2Fgithub.com%2Fnginxinc%2Fnginx-gateway-kubernetes?ref=badge_shield)
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B5618%2Fgithub.com%2Fnginxinc%2Fnginx-kubernetes-gateway.svg?type=shield)](https://app.fossa.com/projects/custom%2B5618%2Fgithub.com%2Fnginxinc%2Fnginx-kubernetes-gateway?ref=badge_shield)

# NGINX Kubernetes Gateway

Expand All @@ -21,29 +21,29 @@ Before you can build and run the NGINX Kubernetes Gateway, make sure you have th

## Build the image

1. Clone the repo and change into the `nginx-gateway-kubernetes` directory:
1. Clone the repo and change into the `nginx-kubernetes-gateway` directory:

```
git clone https://github.com/nginxinc/nginx-gateway-kubernetes.git
cd nginx-gateway-kubernetes
git clone https://github.com/nginxinc/nginx-kubernetes-gateway.git
cd nginx-kubernetes-gateway
```

1. Build the image:

```
make PREFIX=myregistry.example.com/nginx-gateway container
make PREFIX=myregistry.example.com/nginx-kubernetes-gateway container
```

Set the `PREFIX` variable to the name of the registry you'd like to push the image to. By default, the image will be named `nginx-gateway:0.0.1`.
Set the `PREFIX` variable to the name of the registry you'd like to push the image to. By default, the image will be named `nginx-kubernetes-gateway:0.0.1`.


1. Push the image to your container registry:

```
docker push myregistry.example.com/nginx-gateway:0.0.1
docker push myregistry.example.com/nginx-kubernetes-gateway:0.0.1
```

Make sure to substitute `myregistry.example.com/nginx-gateway` with your private registry.
Make sure to substitute `myregistry.example.com/nginx-kubernetes-gateway` with your private registry.

## Deploy NGINX Kubernetes Gateway

Expand All @@ -52,7 +52,7 @@ You can deploy NGINX Kubernetes Gateway on an existing Kubernetes 1.16+ cluster.
1. Load the NGINX Kubernetes Gateway image onto your kind cluster:

```
kind load docker-image nginx-gateway:0.0.1
kind load docker-image nginx-kubernetes-gateway:0.0.1
```

Make sure to substitute the image name with the name of the image you built.
Expand Down
14 changes: 7 additions & 7 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ ARG VERSION
ARG GIT_COMMIT
ARG DATE

WORKDIR /go/src/github.com/nginxinc/nginx-gateway-kubernetes/cmd/gateway
WORKDIR /go/src/github.com/nginxinc/nginx-kubernetes-gateway/cmd/gateway

COPY go.mod go.sum /go/src/github.com/nginxinc/nginx-gateway-kubernetes
COPY go.mod go.sum /go/src/github.com/nginxinc/nginx-kubernetes-gateway
RUN go mod download

COPY cmd /go/src/github.com/nginxinc/nginx-gateway-kubernetes/cmd
COPY internal /go/src/github.com/nginxinc/nginx-gateway-kubernetes/internal
COPY pkg /go/src/github.com/nginxinc/nginx-gateway-kubernetes/pkg
COPY cmd /go/src/github.com/nginxinc/nginx-kubernetes-gateway/cmd
COPY internal /go/src/github.com/nginxinc/nginx-kubernetes-gateway/internal
COPY pkg /go/src/github.com/nginxinc/nginx-kubernetes-gateway/pkg
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -a -ldflags "-s -w -X main.version=${VERSION} -X main.commit=${GIT_COMMIT} -X main.date=${DATE}" -o gateway .

FROM alpine:3.15 as capabilizer
Expand All @@ -21,7 +21,7 @@ COPY ./build/.out/gateway /usr/bin/
RUN setcap 'cap_kill=+ep' /usr/bin/gateway

FROM capabilizer as container-capabilizer
COPY --from=builder /go/src/github.com/nginxinc/nginx-gateway-kubernetes/cmd/gateway/gateway /usr/bin/
COPY --from=builder /go/src/github.com/nginxinc/nginx-kubernetes-gateway/cmd/gateway/gateway /usr/bin/
RUN setcap 'cap_kill=+ep' /usr/bin/gateway

FROM scratch as common
Expand All @@ -32,4 +32,4 @@ FROM common as container
COPY --from=container-capabilizer /usr/bin/gateway /usr/bin/

FROM common as local
COPY --from=local-capabilizer /usr/bin/gateway /usr/bin/
COPY --from=local-capabilizer /usr/bin/gateway /usr/bin/
8 changes: 4 additions & 4 deletions cmd/gateway/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"fmt"
"os"

"github.com/nginxinc/nginx-gateway-kubernetes/internal/config"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/manager"

flag "github.com/spf13/pflag"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

"github.com/nginxinc/nginx-kubernetes-gateway/internal/config"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/manager"
)

const (
Expand Down Expand Up @@ -43,7 +43,7 @@ func main() {
GatewayControllerParam(domain, "nginx-gateway" /* TODO dynamically set */),
)

logger.Info("Starting NGINX Gateway",
logger.Info("Starting NGINX Kubernetes Gateway",
"version", version,
"commit", commit,
"date", date)
Expand Down
2 changes: 1 addition & 1 deletion cmd/gateway/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main_test
import (
"errors"

. "github.com/nginxinc/nginx-gateway-kubernetes/cmd/gateway"
. "github.com/nginxinc/nginx-kubernetes-gateway/cmd/gateway"
flag "github.com/spf13/pflag"

. "github.com/onsi/ginkgo"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Gateway Evaluation
STATUS: Archived

This document captures the design of the initial experimental work to implement the [Gateway API](https://gateway-api.sigs.k8s.io/) using the NGINX data plane. Throughout this document we will refer to this work as "Gateway evaluation".

Expand Down
10 changes: 5 additions & 5 deletions examples/cafe-example/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Example

In this example we deploy NGINX Gateway, a simple web application, and then configure NGINX Gateway to route traffic to that application using `HTTPRoute` resources.
In this example we deploy NGINX Kubernetes Gateway, a simple web application, and then configure NGINX Gateway to route traffic to that application using `HTTPRoute` resources.

## Running the Example

## 1. Deploy NGINX Gateway
## 1. Deploy NGINX Kubernetes Gateway

1. Follow the [installation instructions](https://github.com/nginxinc/nginx-gateway-kubernetes/blob/main/README.md#run-nginx-gateway) to deploy NGINX Gateway.
1. Follow the [installation instructions](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/main/README.md#run-nginx-gateway) to deploy NGINX Gateway.

1. Save the public IP address of NGINX Gateway into a shell variable:
1. Save the public IP address of NGINX Kubernetes Gateway into a shell variable:

```
GW_IP=XXX.YYY.ZZZ.III
```

1. Save the port of NGINX Gateway:
1. Save the port of NGINX Kubernetes Gateway:

```
GW_PORT=<port number>
Expand Down
4 changes: 2 additions & 2 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fi
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
# instead of the $GOPATH directly. For normal projects this can be dropped.
bash "${CODEGEN_PKG}"/generate-groups.sh "deepcopy,client,informer,lister" \
github.com/nginxinc/nginx-gateway-kubernetes/pkg/client \
github.com/nginxinc/nginx-gateway-kubernetes/pkg/apis \
github.com/nginxinc/nginx-kubernetes-gateway/pkg/client \
github.com/nginxinc/nginx-kubernetes-gateway/pkg/apis \
gateway:v1alpha1 \
--output-base "$(dirname "${BASH_SOURCE[0]}")/../../../.." \
--go-header-file "${SCRIPT_ROOT}"/hack/boilerplate.go.txt
11 changes: 6 additions & 5 deletions internal/events/loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import (
"fmt"

"github.com/go-logr/logr"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/nginx/config"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/nginx/file"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/nginx/runtime"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/state"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/status"
apiv1 "k8s.io/api/core/v1"
"sigs.k8s.io/gateway-api/apis/v1alpha2"

"github.com/nginxinc/nginx-kubernetes-gateway/internal/nginx/config"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/nginx/file"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/nginx/runtime"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/state"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/status"
)

// EventLoop is the main event loop of the Gateway.
Expand Down
17 changes: 9 additions & 8 deletions internal/events/loop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@ package events_test
import (
"context"

"github.com/nginxinc/nginx-gateway-kubernetes/internal/events"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/nginx/config"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/nginx/config/configfakes"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/nginx/file/filefakes"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/nginx/runtime/runtimefakes"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/state"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/state/statefakes"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/status/statusfakes"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
apiv1 "k8s.io/api/core/v1"
Expand All @@ -20,6 +12,15 @@ import (
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
"sigs.k8s.io/gateway-api/apis/v1alpha2"

"github.com/nginxinc/nginx-kubernetes-gateway/internal/events"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/nginx/config"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/nginx/config/configfakes"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/nginx/file/filefakes"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/nginx/runtime/runtimefakes"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/state"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/state/statefakes"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/status/statusfakes"
)

type unsupportedResource struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/implementations/gateway/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package implementation

import (
"github.com/go-logr/logr"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/config"
"github.com/nginxinc/nginx-gateway-kubernetes/pkg/sdk"

"sigs.k8s.io/gateway-api/apis/v1alpha2"

"github.com/nginxinc/nginx-kubernetes-gateway/internal/config"
"github.com/nginxinc/nginx-kubernetes-gateway/pkg/sdk"
)

type gatewayImplementation struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/implementations/gatewayclass/gatewayclass.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package implementation

import (
"github.com/nginxinc/nginx-gateway-kubernetes/internal/config"
"github.com/nginxinc/nginx-gateway-kubernetes/pkg/sdk"

"github.com/go-logr/logr"
"sigs.k8s.io/gateway-api/apis/v1alpha2"

"github.com/nginxinc/nginx-kubernetes-gateway/internal/config"
"github.com/nginxinc/nginx-kubernetes-gateway/pkg/sdk"
)

type gatewayClassImplementation struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/implementations/gatewayconfig/gatewayconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package gatewayconfig

import (
"github.com/go-logr/logr"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/config"
"github.com/nginxinc/nginx-gateway-kubernetes/pkg/sdk"

nginxgwv1alpha1 "github.com/nginxinc/nginx-gateway-kubernetes/pkg/apis/gateway/v1alpha1"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/config"
nginxgwv1alpha1 "github.com/nginxinc/nginx-kubernetes-gateway/pkg/apis/gateway/v1alpha1"
"github.com/nginxinc/nginx-kubernetes-gateway/pkg/sdk"
)

type gatewayConfigImplementation struct {
Expand Down
8 changes: 4 additions & 4 deletions internal/implementations/httproute/httproute.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package implementation

import (
"github.com/go-logr/logr"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/config"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/events"
"github.com/nginxinc/nginx-gateway-kubernetes/pkg/sdk"
"k8s.io/apimachinery/pkg/types"

"sigs.k8s.io/gateway-api/apis/v1alpha2"

"github.com/nginxinc/nginx-kubernetes-gateway/internal/config"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/events"
"github.com/nginxinc/nginx-kubernetes-gateway/pkg/sdk"
)

type httpRouteImplementation struct {
Expand Down
7 changes: 4 additions & 3 deletions internal/implementations/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package service

import (
"github.com/go-logr/logr"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/config"
"github.com/nginxinc/nginx-gateway-kubernetes/internal/events"
"github.com/nginxinc/nginx-gateway-kubernetes/pkg/sdk"
apiv1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"

"github.com/nginxinc/nginx-kubernetes-gateway/internal/config"
"github.com/nginxinc/nginx-kubernetes-gateway/internal/events"
"github.com/nginxinc/nginx-kubernetes-gateway/pkg/sdk"
)

type serviceImplementation struct {
Expand Down
Loading