-
Notifications
You must be signed in to change notification settings - Fork 143
Configure Agent #524
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
Closed
Closed
Configure Agent #524
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5a88636
Update agent version
44266cb
Update manifests and nginx-agent conf
b657659
Agent config store, builder, secret files, observer/subject, gen main…
9658b4e
Add config gen
864566b
Remove gotemplate alias, add explicit listen 80, and move error serve…
736a3dd
Remove agent interface, agent pool, and agent manager
897a27d
Track connections on commander; implement download and upload
3a126da
Implement config pull and send
0b74ef9
Add test example files
67a8bc6
Lint fixes
1be91eb
Fix some errors
88ca763
Update manifests; remove capabilizer
4dd6fc9
Remove file writing from secret mgr
5ff2d94
Remove file and runtime nginx management
38ea307
rework observer subject
b921566
Refactor
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,44 +1,27 @@ | ||
| # syntax=docker/dockerfile:1.4 | ||
| # syntax=docker/dockerfile:1.5 | ||
| FROM golang:1.20 as builder | ||
| ARG VERSION | ||
| ARG GIT_COMMIT | ||
| ARG DATE | ||
|
|
||
| WORKDIR /go/src/github.com/nginxinc/nginx-kubernetes-gateway/cmd/gateway | ||
|
|
||
| COPY go.mod go.sum /go/src/github.com/nginxinc/nginx-kubernetes-gateway | ||
| 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-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.17 as capabilizer | ||
| RUN apk add --no-cache libcap | ||
|
|
||
| FROM capabilizer as local-capabilizer | ||
| 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-kubernetes-gateway/cmd/gateway/gateway /usr/bin/ | ||
| RUN setcap 'cap_kill=+ep' /usr/bin/gateway | ||
|
|
||
| FROM capabilizer as goreleaser-capabilizer | ||
| ARG TARGETARCH | ||
| COPY dist/gateway_linux_$TARGETARCH*/gateway /usr/bin/ | ||
| RUN setcap 'cap_kill=+ep' /usr/bin/gateway | ||
|
|
||
| FROM scratch as common | ||
| USER 1001:1001 | ||
| ENTRYPOINT [ "/usr/bin/gateway" ] | ||
|
|
||
| FROM common as container | ||
| COPY --from=container-capabilizer /usr/bin/gateway /usr/bin/ | ||
| COPY --from=builder /go/src/github.com/nginxinc/nginx-kubernetes-gateway/cmd/gateway/gateway /usr/bin/ | ||
|
|
||
| FROM common as local | ||
| COPY --from=local-capabilizer /usr/bin/gateway /usr/bin/ | ||
| COPY ./build/.out/gateway /usr/bin/ | ||
|
|
||
| FROM common as goreleaser | ||
| COPY --from=goreleaser-capabilizer /usr/bin/gateway /usr/bin/ | ||
| COPY dist/gateway_linux_$TARGETARCH*/gateway /usr/bin/ |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| apiVersion: gateway.networking.k8s.io/v1beta1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| name: coffee | ||
| spec: | ||
| parentRefs: | ||
| - name: gateway | ||
| sectionName: http | ||
| hostnames: | ||
| - "cafe.example.com" | ||
| rules: | ||
| - matches: | ||
| - path: | ||
| type: PathPrefix | ||
| value: /coffee | ||
| backendRefs: | ||
| - name: coffee | ||
| port: 80 | ||
| --- | ||
| apiVersion: gateway.networking.k8s.io/v1beta1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| name: tea | ||
| spec: | ||
| parentRefs: | ||
| - name: gateway | ||
| sectionName: http | ||
| hostnames: | ||
| - "cafe.example.com" | ||
| rules: | ||
| - matches: | ||
| - path: | ||
| type: PathPrefix | ||
| value: /tea | ||
| backendRefs: | ||
| - name: tea | ||
| port: 80 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| apiVersion: gateway.networking.k8s.io/v1beta1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| name: coffee | ||
| spec: | ||
| parentRefs: | ||
| - name: gateway | ||
| sectionName: http | ||
| hostnames: | ||
| - "cafe.example.com" | ||
| rules: | ||
| - matches: | ||
| - path: | ||
| type: PathPrefix | ||
| value: /coffee-v2 | ||
| backendRefs: | ||
| - name: coffee | ||
| port: 80 | ||
| --- | ||
| apiVersion: gateway.networking.k8s.io/v1beta1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| name: tea | ||
| spec: | ||
| parentRefs: | ||
| - name: gateway | ||
| sectionName: http | ||
| hostnames: | ||
| - "cafe.example.com" | ||
| rules: | ||
| - matches: | ||
| - path: | ||
| type: PathPrefix | ||
| value: /tea-v2 | ||
| backendRefs: | ||
| - name: tea | ||
| port: 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| apiVersion: gateway.networking.k8s.io/v1beta1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| name: coffee | ||
| spec: | ||
| parentRefs: | ||
| - name: gateway | ||
| sectionName: http | ||
| hostnames: | ||
| - "cafe.example.com" | ||
| rules: | ||
| - matches: | ||
| - path: | ||
| type: PathPrefix | ||
| value: /coffee-v3 | ||
| backendRefs: | ||
| - name: coffee | ||
| port: 80 | ||
| --- | ||
| apiVersion: gateway.networking.k8s.io/v1beta1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| name: tea | ||
| spec: | ||
| parentRefs: | ||
| - name: gateway | ||
| sectionName: http | ||
| hostnames: | ||
| - "cafe.example.com" | ||
| rules: | ||
| - matches: | ||
| - path: | ||
| type: PathPrefix | ||
| value: /tea-v3 | ||
| backendRefs: | ||
| - name: tea | ||
| port: 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| apiVersion: gateway.networking.k8s.io/v1beta1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| name: coffee | ||
| spec: | ||
| parentRefs: | ||
| - name: gateway | ||
| sectionName: http | ||
| hostnames: | ||
| - "cafe.example.com" | ||
| rules: | ||
| - matches: | ||
| - path: | ||
| type: PathPrefix | ||
| value: /coffee-v4 | ||
| backendRefs: | ||
| - name: coffee | ||
| port: 80 | ||
| --- | ||
| apiVersion: gateway.networking.k8s.io/v1beta1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| name: tea | ||
| spec: | ||
| parentRefs: | ||
| - name: gateway | ||
| sectionName: http | ||
| hostnames: | ||
| - "cafe.example.com" | ||
| rules: | ||
| - matches: | ||
| - path: | ||
| type: PathPrefix | ||
| value: /tea-v4 | ||
| backendRefs: | ||
| - name: tea | ||
| port: 80 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.