Commit graph

474 commits

Author SHA1 Message Date
Ehsan Saei
2d2ec558ae
fix opentelemetry-cpp-contrib sha256 (#8588) 2022-05-16 06:20:18 -07:00
Ehsan Saei
24925ccd2b
Opentelemetry module build (#8585)
* nginx opentelemetry modules

* revert sha check
2022-05-14 06:41:17 -07:00
Long Wu Yuan
24b8e32b08
bumped go version to 1.18.1 (#8578) 2022-05-11 11:45:03 -07:00
Long Wu Yuan
6d9a39eda7
changes for release v1.2.0 (#8491) 2022-04-21 19:36:13 -07:00
Long Wu Yuan
2e1a4790bb
changed nginx base img tag to img built with alpine3.14.6 (#8479) 2022-04-15 21:37:10 -07:00
Ricardo Katz
81c2afd975
update base images and protobuf gomod (#8478) 2022-04-15 12:53:12 -07:00
James Strong
7517b7ecf7
Merge pull request #8396 from dmathieu/mkdir-modules-mount
Fix OpenTelemetry build
2022-03-31 19:55:53 -04:00
Aditya Kamath
f1cb2b73ca
update nginx base image to new alpine 3.14.4 build - try 2 (#8409)
* update nginx base image to new alpine 3.14.4 build

Signed-off-by: James Strong <strong.james.e@gmail.com>

* update test image

Signed-off-by: James Strong <strong.james.e@gmail.com>

* Update nginx base image

Signed-off-by: Aditya Kamath <theunrealgeek@gmail.com>

Co-authored-by: James Strong <strong.james.e@gmail.com>
2022-03-31 13:43:04 -07:00
Long Wu Yuan
87979099fd
set execute bit on entrypoint.sh (#8404) 2022-03-31 04:25:00 -07:00
Aditya Kamath
5402d35663
Add execute permissions to nginx image entrypoint.sh (#8403) 2022-03-31 03:37:01 -07:00
Damien Mathieu
79aa43540c fix build and upgrade otel to latest version 2022-03-29 12:07:43 +02:00
Damien Mathieu
244d1dbcb0 ensure module directory exists before moving the library there 2022-03-29 10:28:48 +02:00
James Strong
9960efe1e9
remove (#8394)
Signed-off-by: James Strong <strong.james.e@gmail.com>
2022-03-28 07:49:23 -07:00
James Strong
5298448865
downgrade to 3.14.4 and fix tag (#8386)
Signed-off-by: James Strong <strong.james.e@gmail.com>
2022-03-25 10:21:58 -07:00
Tim Borkhodoev
f192ed0ed7
bump luarocks to 3.8.0 (#8379) 2022-03-22 18:53:58 -07:00
Nishant Jain
5c07c862e1
Removed s390x, linux/arm platform as docker build was crashing (#8121)
Co-authored-by: Carlos Tadeu Panato Junior <ctadeu@gmail.com>
2022-03-22 04:23:44 -07:00
James Strong
e51c15160e
fix indent on env (#8352)
* fix indent on env

* revert tag to      - TAG=$_GIT_TAG
2022-03-18 10:04:41 -07:00
Ana Claudia Riekstin
3f19fd646f
bump Alpine image in Dockerfile (#8350) 2022-03-17 18:19:40 -07:00
James Strong
40bb6c3d2e
update cloud build (#8349) 2022-03-17 12:02:41 -07:00
James Strong
569b3c2a70
update cloud build image
Signed-off-by: James Strong <strong.james.e@gmail.com>
2022-03-16 15:32:45 -04:00
James Strong
5c47803d0f
fix the cloud build
Signed-off-by: James Strong <strong.james.e@gmail.com>
2022-03-16 15:13:24 -04:00
James Strong
0e2447ed0e
add the date per request
Signed-off-by: James Strong <strong.james.e@gmail.com>
2022-03-16 15:07:38 -04:00
James Strong
952a6dc22c
control tag with short sha
Signed-off-by: James Strong <strong.james.e@gmail.com>
2022-03-16 14:52:06 -04:00
James Strong
2fefd714bd
update tag and force a new build
Signed-off-by: James Strong <strong.james.e@gmail.com>
2022-03-16 12:57:48 -04:00
James Strong
1953efa9d8
Bumping alpine base to 3.15 2022-03-16 11:52:38 -04:00
sskserk
01b92b8b3a
Nginx v1.19.10 (#8307) 2022-03-14 08:55:57 -07:00
James Strong
a43346d975
leaving it the git tag (#8311)
fixing the git tag for the image version, it is what it is .
2022-03-07 09:38:53 -08:00
James Strong
c5c35881c0
remove git tag env from cloud build
the latest git tag is from helm, so force the make file use of TAG ?=v$(shell date +%m%d%Y)-$(shell git rev-parse --short HEAD)
2022-03-02 14:49:01 -05:00
James Strong
6064a1cd72
update tag for image (#8290) 2022-03-02 11:07:13 -08:00
Damien Mathieu
7b96999eb9
Fix OpenTelemetry sidecar image build (#8286)
* fix wrong checksum for nginx image

* fix wrong platform. Arm64 has grpc, when arm doesn't
2022-03-02 08:39:14 -08:00
James Strong
49761416e1
force prow job by changing something in images/ot dir (#8281)
Images dir was merged in before the test-infra prow job, so the image was never built. 

https://github.com/kubernetes/ingress-nginx/pull/8013 Jan 16

https://github.com/kubernetes/test-infra/pull/25344/files Prow job 4 days ago.
2022-03-01 09:35:55 -08:00
Ricardo Katz
935ea3d830
Update libraries in webhook image (#8227) 2022-02-06 12:42:51 -08:00
Damien Mathieu
15b0aba03b
First sidecar module: OpenTelemetry (#8013)
* remove opentelemetry from main nginx image

* add opentelemetry sidecar image

* handle extra modules in helm chart

* fix running helm chart

* mount the modules volume in the init container

* merge the mounted folder

* fix the otel image

* fix licence year

* fix cloudbuild image

* use the same nginx version as in the main image

* only retrieve /etc/nginx/modules for now
2022-01-16 13:33:28 -08:00
Ricardo Katz
fd820db469
Update to go v1.17.6 (#8119) 2022-01-09 17:31:11 -08:00
learn0208
8e9bf7f62c
fix custom-error-pages file not exist (#7728) 2021-12-23 13:28:29 -08:00
dmitry-j-mikhin
8ccec84496
fix nginx compilation flags (#8023)
* use '-O2' instead of '-Og'
  '-O2' produce production optimized binary while '-Og' is used mostly
  for debugging
* use '-mtune=generic' instead of '-mtune=native'
  '-mtune=native' produce optimal code for builder host system, but it
  can be sub-optimal for execution host system
2021-12-12 05:25:58 -08:00
Aaron Crickenberger
a9029d2bc7
images: use k8s-staging-test-infra/gcb-docker-gcloud (#7999) 2021-12-12 05:19:59 -08:00
Jintao Zhang
e621c6e973
fix: go-grpc Dockerfile (#8001)
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2021-11-30 17:35:18 -08:00
Mateusz Gozdek
1d1e89eb9b
Add myself as a reviewer to images/kube-webhook-certgen (#7845)
* OWNERS_ALIASES: add ingress-nginx-kube-webhook-certgen-reviewers

For extra kube-webhook-certgen reviewers.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen: add separate owners

To add myself as a reviewer as discussed in #7641.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
2021-10-25 07:04:24 -07:00
Damien Mathieu
eb482db5b3
disable opentelemetry on arm (#7831) 2021-10-24 12:12:21 -07:00
Damien Mathieu
9da4d87d0c
Properly check whether we can install opentelemetry, and switch it back to main repo (#7803)
* check for the exact value of USE_OPENTELEMETRY

* use latest commit from the main opentelemetry-cpp-contrib repo
2021-10-12 12:16:34 -07:00
Mateusz Gozdek
54523641a8
images/kube-webhook-certgen/rootfs: add missing tests and fix regression (#7801)
* images/kube-webhook-certgen/rootfs: improve tests objects creation

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs: use context with deadline for tests

So in case some operations are taking more time, we respect -timeout
flag.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs: add missing tests implementation

It should've been added in 9acf62d867.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs: fix patching only mutating webhook

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
2021-10-12 10:07:47 -07:00
Damien Mathieu
0c16980018
add OpenTelemetry to nginx base image (#7669) 2021-10-11 06:16:40 -07:00
Mateusz Gozdek
757aa53686
Add CI for images/kube-webhook-certgen (#7717)
As a follow up to PR #7641, this commit adds some basic e2e tests for
kube-webhook-certgen image.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
2021-10-10 11:40:37 -07:00
Ricardo Katz
6885ab2281
Update base nginx image to the corrected version (#7705) 2021-09-26 16:24:23 -07:00
Mateusz Gozdek
9acf62d867
images/kube-webhook-certgen/rootfs: add support for patching APIService objects (#7641)
* images/kube-webhook-certgen/rootfs/pkg/k8s: return err from functions

Initially only from some to preserve existing behavior.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs: make patching return error

So we don't call log.Fatal in so many places, which makes code testable.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/pkg/k8s: require context

So initialize top-level contexts in tests and CLI, then pass them around
all the way down, so there is an ability e.g. to add timeouts to patch
operations, if needed and to follow general conventions.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/pkg/k8s: support patching APIService

APIService object is very similar to MutatingWebhookConfiguration and
ValidatingWebhookConfiguration objects, so support for patching it
shouldn't be too much of a burden.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/cmd: use new patch API

So old function PatchWebhookConfigurations can be unexported and CLI can
be extended to also support patching APIService.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/pkg/k8s: unexport old patch function

PatchObjects should be now used instead.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs: add .gitignore

To ignore manually built binaries during development process.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/cmd: test patching

By adding a PatchConfig and Patch function, it is now possible to test
logic of flag validation, which was previously tied to CLI options.

This commit adds nice set of tests covering existing logic.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/cmd: improve formatting

Those strings will be changed anyway in future commits, so at first we
can properly capitalize used names.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/cmd: support patching APIService

As logic for creating a CA certificate and patching an object is almost
the same for both webhook configuration and API services, this commit
adds support to kube-webhook-certgen CLI to also patch APIService
objects, so they can be served over TLS as well.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs: pass failure policy by value

k8s.k8s.patchWebhookConfigurations() always dereferences it and we do
not do a nil check, so the code may panic in some conditions, so it's
safer to just pass it by value, as it's just a wrapped string.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
2021-09-26 10:44:22 -07:00
Ricardo Katz
5662db4509
Fix resty balancer checksum and location (#7703) 2021-09-26 10:28:21 -07:00
Jintao Zhang
0606ef8282
fix: upgrade lua-resty-balancer to v0.04 (#7702)
it has two important bugfix:

1. should force convert weight to a number since it may cause dead loop
   when weight is a string type "0".
2. out-of-bounds memory writing may happen in chash_point_sort.

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2021-09-26 08:50:23 -07:00
Mateusz Gozdek
260910c0a0
images/kube-webhook-certgen/rootfs: improvements (#7630)
* images/kube-webhook-certgen/rootfs/README.md: remove trailing whitespace

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs: improve code formatting

Automatically using gofumpt.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs: remove executable bits from files

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/cmd: remove unreachable code

log.Fatal(|f) will alread call os.Exit(1), so this code is never
reached.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/pkg/k8s: fix unit tests

Right now they fail as everything else migrated from using v1beta1 to
v1.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs: create clientset in cmd package

So one can easily mock the client, without touching unexported parts of
the code and to soften the dependency between CLI code (kubeconfig
path).

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/cmd: simplify bool logic

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/pkg/k8s: improve formatting

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/pkg/k8s: improve variable names

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/pkg/k8s: refactor a bit

Move patching logic to separate functions.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/pkg/k8s: fix error log messages

In patchMutating() function, log messages were waying still patching
validating webhook.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
2021-09-16 13:59:26 -07:00
Jintao Zhang
d9f96bbbba
Update NGINX base image to v1.19 (#7643)
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2021-09-16 05:07:46 -07:00