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

Backport of Add readOnlyRootFilesystem to security context (#2771) into release/1.2.x #2830

Conversation

hc-github-team-consul-core
Copy link
Collaborator

Backport

This PR is auto-generated from #2789 to be assessed for backporting due to the inclusion of the label backport/1.2.x.

The below text is copied from the body of the original PR.


Changes proposed in this PR:

How I've tested this PR:

How I expect reviewers to test this PR:

Checklist:


Overview of commits

curtbushko and others added 30 commits June 7, 2023 19:51
* Add FIPS builds for linux amd64

* add version check

* fix CI labels and add local dev commands

* fix ci version tagging

* switch to ubuntu 20.04

* add CLI version tag

* add gcompat for alpine glibc cgo compatibility

* remove FIPS version check from connect-init

* address comments
- making this trigger nightly until after 1.2.0 GA
- leaving 0.49.x active until after 1.2.0 GA
* first run through, needs help

* still need to make secure pass

* left something uncommented

* it works and also cleanup

* fix acceptance tests
* [API Gateway] Add acceptance test for cluster peering

* Fix linter

* Fix random unrelated linter errors to get CI to run: revert later?

* one more linter fix to later probably revert

* more linter fixes

* Revert "more linter fixes"

This reverts commit 6210dff.

* Revert "one more linter fix to later probably revert"

This reverts commit 030c563.

* Revert "Fix random unrelated linter errors to get CI to run: revert later?"

This reverts commit fdeccab.
…ersion of kind and k8s 1.27 (#2304)

* update cloud tests to use 1.24, 1.25 and 1.26 version of kubernetes for more coverage

* updated readme for supported kubernetes versions

* added changelog
* [API Gateway] WAN Federation test and fixes

* Fix unit tests
* Fix when gateways are deleted before we get services populated into cache

* a bit of cleanup
…assConfig are obeyed (#2272)

* Add unit tests verifying that scaling parameters on GatewayClassConfig are obeyed

* Add test case for scaling w/ no min or max configured
* Rename GatewayClassController to prevent name collision

* Use gateway instead of gatewayclass in name

* Use the constant in ownership checks

* Change GatewayClass name to "consul"

* Change GatewayClass name in cases

* Change ApiGatewayClass back
* Fix SupportedKinds array to be what Conformance test expects

* Fix cert validation status condition for listeners

* Add programmed condition for listeners

* Fix unit test

---------

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
* first pass at halting: got httproute and api-gateway done

* clean up test

* Handle all set for infinite reconcile check

* Add table tests for minimal setup

* Added some odd field names to test normalization is handled correctly

* Use funky casing http routes
* Added helm inputs for managing audit logs
* Remove unwanted changes from values
* fix: use correct flag when translating namespaces

* Use non-normalized namespace when deregistering services

* Guard against namespace queries when namespaces not enabled in cache
* added imagePullPolicy for images in values.yaml

* fix: renamed pullPolicy key according to image

* fixed dafault always in tmpl

* changed structure of image in yaml

* revert changes

* added global imagePullPolicy

* fixed typo

* added changelog file
This brings consul-k8s in line with consul.
Most importantly, the backport assistant was updated to automatically assign created PRs to the author of the PR that is being backported.
* update changelog based on changes made to 1.2.x

* fixed test cases
- enterprise cases were in the OSS test cases
* trigger conformance tests nightly, squash

* remove extra line

* Update nightly-api-gateway-conformance.yml
making scripts more robust and removing changing helm chart
* Fix cache and service deletion issue

* Add comments

* add in acceptance test

* Fix indentation

* Fix unit test for deleting gateway w/ consul services

* Remove redundant service deregistration code

* Exit loop early once registration is found for service

* Fix import blocking

* Set status on pods added to test

* Apply suggestions from code review

* Reduce count of test gateways to 10 from 100

---------

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
Co-authored-by: Sarah Alsmiller <sarah.alsmiller@hashicorp.com>
* Adding support for weighted k8s service

* Adding changelog

* if per-app weight is 0 then pull the weight to 1

* Addressing review comments

* Addressing review comments

* Addressing review comments

* Comment update

* Comment update

* Parameterized table test

* Parameterized table test

* fixing linting issue

* fixing linting issue

---------

Co-authored-by: srahul3 <rahulsharma@hashicorp.com>
* Bumping go-discover to the lastest version
zalimeni and others added 22 commits July 31, 2023 09:55
* Fix default Ent image tag in acceptance tests

Rather than hard-coding the Docker repository and parsing the non-Ent
image tag for a version, simply replace the image name and retain other
coordinates. This is consistent with our tagging scheme introduced in
hashicorp/consul#13541 and will allow for using
`hashicorppreview` images seamlessly regardless of whether OSS or Ent is
being tested.

* Add make target for loading images in kind

Complement other multi-cluster make targets by supporting image loading
across kind clusters.
increase timeout while waiting for server to be ready and fix require.Equal check
* Increase the retries and add config entry retries
…ing on OpenShift (#2184)

Co-authored-by: Melisa Griffin <melisa.griffin@hashicorp.com>
* Adds port mapping to Gateway Class Config to avoid running container on privileged ports

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
* Implement validation of TLS options

* Use constants for annotation keys

* Add changelog entry

* Implement TLS options translation

* Update changelog entry

* Add unit test coverage for TLS option validation

* Code review feedback
* JWT auth basic acceptance test

* Update to run only in enterprise mode, update comment to be correct

* Remove usage of `testing.t` in retry block

* Fixed last `t` in retry block in tests

* Update acceptance/tests/api-gateway/api_gateway_test.go

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>

* Update acceptance/tests/api-gateway/api_gateway_test.go

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>

* Updating filenames for gw jwt cases and adding message about why this
test is skipped

---------

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
Apply K8s node locality to services and sidecars

Locality-aware routing is based on proxy locality rather than the
proxied service. Ensure we propagate locality to both when registering
services.
* Set privileged to false unless on OpenShift without CNI
* added fixtures

* removed fixtures
- intentions only gets added now if acls are enabled
- payment-service-resolver is only for locality aware which isn't in scope for this PR

* updated sameness tests to include peering
- refactored with some helper functions for members (now TestClusters)
- made names more uniform, tend more towards the cluster-01-a/cluster-02-a/etc. nomenclature

* added 4 clusters to cni make target

* disable proxy lifecycle
* add additional tproxy static-client
- this doesn't specify an upstream so that tproxy will be able to handle routing

* add tproxy coverage
- add control-flow to handle using the virtual host name when tproxy is enabled
Add `PrioritizeByLocality` to `ProxyDefaults` CRD

In addition to service resolver, add this field to the CRD for proxy
defaults for parity with Consul config options.
* readOnlyRootFilesystem

* Add mount for /tmp

* Add /tmp mountpoint

* Update ingress-gateways-deployment.yaml

* Update terminating-gateways-deployment.yaml

* Update helm unit tests
@hashicorp-cla
Copy link

hashicorp-cla commented Aug 23, 2023

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes


8 out of 9 committers have signed the CLA.

  • curtbushko
  • zalimeni
  • missylbytes
  • nathancoleman
  • jm96441n
  • wilkermichael
  • david-yu
  • mr-miles
  • Paul Glass

Paul Glass seems not to be a GitHub user.
You need a GitHub account to be able to sign the CLA. If you already have a GitHub account, please add the email address used for this commit to your account.

Have you signed the CLA already but the status is still pending? Recheck it.

@david-yu
Copy link
Contributor

Hmm looks like I'll need to do a manual backport.

@david-yu david-yu closed this Aug 23, 2023
auto-merge was automatically disabled August 23, 2023 18:16

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet