Commit Graph

326 Commits

Author SHA1 Message Date
Stavros Kontopoulos da5e7fd7b3
Bump cert-manager and use their clientset (#15703)
* use cert-manager clientset

* fix

* fix gengo incomp

* lint

* fix remaining lint issues

* Revert "fix remaining lint issues"

This reverts commit 82b465cfa15b54c33d8cd08c6e1b4c79e252ee77.

* Revert "lint"

This reverts commit 0334fc2591ce80ddaed8d61f54cfb74cdf905835.

* vendor
2025-01-21 01:27:09 +00:00
Dave Protasowski 3216ab31bc
Drop the use dprotaso/controller-tools fork (#15664)
* Drop the use dprotaso/controller-tools fork

Keeping the fork up to date is not really tenable and it's
fairly complex. We now simply manipulate the resulting
CRD yaml after generation

* go mod tidy

* Prune the allowed scaleTargetRef fields

* allow containers.privileged

* update overrides to include hostPath feature flag

* refactor function for readability

* refactor feature key constants to prevent typos

* drop schema patch config file

* close encoder prior to writing the file
2025-01-09 13:33:19 +00:00
Amarendra Kumar 0d589da56e
Add support for hostPath (#15648)
* 15546: Add support for hostPath

* 15546: Fix additional Space and eof

* Fix eof

* update for EOF

* revert mess up

* remove white spaces

* added Comment

* remove extra validations as its there in K8
2025-01-06 18:23:56 +00:00
Kapil Sareen da8d2d14fa
Allow securityContext.Privileged to be configurable (#15643)
* makes securityContext.Privileged configurable

* resolves review

* fix go formatting

---------

Co-authored-by: Dave Protasowski <dprotaso@gmail.com>
2024-12-30 17:02:49 +00:00
Stavros Kontopoulos f07e3d6f30
Fix deepcopy gen (#15492) 2024-09-03 11:21:17 +00:00
Stavros Kontopoulos 372f5d1202
Migrate to kube codegen (#15491) 2024-09-03 09:02:27 +00:00
Dave Protasowski 64820f2772
update schema-config (#15467) 2024-08-14 05:15:58 +00:00
Stavros Kontopoulos 2b86c14394
Add support for hostipc, hostpid and hostnetwork (#15414)
* Feature: added PodSpec.HostIPC extension

* updates for hostipc

* add support for hostpid and hostnetwork

---------

Co-authored-by: Pablo Carneiro Elias <pablo.cael@gmail.com>
2024-08-01 15:40:43 +00:00
Reto Lehmann ac7f5859ef
Add startup probe support to Knative Service (#15309)
* Add startup probe to CRDs

* Allow startup probes in Knative Services

* Increase ProgressDeadlineSeconds when startup probe is present

* Remove ProgressDeadlineSeconds increase when startup probe is present
2024-07-08 18:53:33 +00:00
Stavros Kontopoulos 5a92452944
Clean up job for old resources (#15312)
* clean up for old resources

* fix header

* fix job yaml writing

* lint

* updates

* new line
2024-06-19 21:16:17 +00:00
Stavros Kontopoulos 6ccb82f47c
Integrate net-certmanager in Serving (#15066)
* integrate net-certmanager in Serving

* Revert "disable kourier-tls (#15053)"

This reverts commit 8bda840b1a.

* fix imports

* add netcert conformance tests

* fix vendor

* add vendor networking test files

* some fixes + rebase

* fixes

* add crd check

* sym link

* fix vendor

* move reconciler

* fix style

* empty

* move to pkg/client
2024-04-25 19:36:46 +00:00
Dave Protasowski a92b2eed3c
Drop unused OWNER files and drop productivity folks from being tagged for review (#15051) 2024-03-28 08:10:22 +00:00
Roland Huß 05e349fa97
Allow access to Pod field `shareProcessNamespace`. (#14454)
* Allow access to Pod field `shareProcessNamespace`.

Feature is guarded by feature flag "kubernetes.podspec-shareprocessnamespace".
Fixes #14137.

* Add missing test for shareProcessNamespace
2023-09-28 19:50:20 +00:00
Reto Lehmann 0d73dfe0f2
Update performance tests (#14289)
* Update performance tests

* add updated grafana dashboard

* add better logging

* make sure results are always calculated

* use existing Knative grafana instance

* add local grafana setup instructions

* Add real traffic test

* Add datasource variable in grafana dashboard

* Update grafana URL

* Drop old grafana file

* Add new test to simulate real traffic

* Minor improvements

* Create service in code instead of using YAML

* Add function to wrap reporting vegeta.Metrics to influxdb

* Update grafana dashboard

* add from + to filter to grafana link

* fix pointers

* make `knative.dev/serving/test/v1` work with `injection.ParseAndGetRESTConfigOrDie()`

* minor test fixes

* use milliseconds for grafana url params

* fix review dog warnings

* use BUILD_ID and JOB_NAME to identify a CI job

* drop unnecessary type conversions

* Run `hack/update-deps.sh`

* use `envsubst` instead of `sed`

* Review fixes

* Wait for all KSVC to be deleted before starting the next job
2023-09-21 20:55:27 +00:00
Seongpyo Hong d02702e1a6
Support gRPC probe (#14134)
* Add gRPC probe

* Modify unit test

* Modify unit test

* Set default to grpcprobe's service field

* Use knative pkg for ptr operation

* Use config's KubeMajor & KubeMinor instead of k8s native version pkg

* Wrap error in GRPCProbe

* Add comment to explain why use dialer_others.go

* Run update scripts

* Add probe test

* Add test in readiness/probe_test.go

* update deps

* Ignore readinessProbe when it's gRPC

* Fix test to use empemeral port

* Resolve govet lint error

* Use errors.Is to compare

* Also use ephemeral port for handler test

* drop unneccesary else block
2023-09-21 20:55:18 +00:00
JinVei 3010cb8e2a
docs: Fix broken links to kubernetes docs on reference page (#14340) 2023-09-12 04:48:51 +00:00
Caleb Woodbine e9425f8d52
chore: remove v1alpha1 domainmapping (#14275)
the API is deprecated and is ready to removed
2023-08-18 20:27:18 +00:00
Clay Kauzlaric 113616bec1
add support for downwardAPI in projected volumes (#13896)
* add support for downwardAPI in projected volumes

* fix lint failure

* Implicit memory aliasing in for loop. (gosec)

* fix typo in tests
2023-04-24 17:34:44 +00:00
Evan Anderson 036085053d
Add secure-pod-defaults flag to default Pods to 'restricted' profile by default (#13398)
* Add secure-pod-defaults flag to default Pods to 'restricted' profile by default

* Account for pod-level SecurityContext when setting defaluts

* Fix format that somehow slipped through auto-format-on-save

* Fix lint unparam complaint

* Don't default Revision values when BYO name is unchanged.

Fixes #11512

* Switch to using a context-passed ConfigurationSpec reference instead of hard-coding Configuration and Service.

* Complete docstring for WithConfigurationSpec

* Permit explicitly selecting Kubernetes defaults in PodSecurityContext.

* Fix comment on defaultSecurityContext

* Allow both "safe" future default and "unsafe" current default to be set explicitly when feature is enabled.

* Add seccompProfile to CRD schemas (it was accepted, but not documented)

* Add e2e tests, checking CI combinations

* Capabilities.Drop is "omitempty", so it will always be empty instead of nil.

* Fix e2e test comment.
2023-01-24 05:27:38 +00:00
Matt Moore 555e6abda6
Fix: Add the new `AllowPrivilegeEscalation` field to the *other* fieldmask. (#13402)
🐛 My previous changed missed the new config file that controls how the CRD schema is updated.

You can now clearly see the fields being added to the schemas.

Apologies for the break, I had no clue this was a thing!

/kind bug

Related: https://github.com/knative/serving/pull/13395
2022-10-16 23:22:56 +00:00
Dave Protasowski e701a33a81
Update Knative Serving schema (#13095)
* drop unnecessary validation

* use dave's fork of controller-tools

* ensure arrays have an item schema

* drop list map type markers

* tweak conformance tests to allow fields to be pruned if the create request doesn't error out

* split lifecycle test to prestop/poststart
2022-07-11 20:17:12 +00:00
Nader Ziada 1a99825db5
Use mako stub for collecting performance tests results (#12889)
* revert eefc3cce62

* use mako stub for perf testing

* clean up

* reduce number of tests to make job go faster

* more cleanup to address pr comments

* fix comments in mako-perf-tests-script

* remove extra lines from script

* install netstat when reading results
2022-05-13 15:24:55 +00:00
Paul Schweigert 646d0b1a96
removing deprecated serving.knative.dev/release label (#12754)
Signed-off-by: Paul S. Schweigert <paulschw@us.ibm.com>

Previously agreed these labels would be dropped in release v1.4
See discussion in https://github.com/knative/serving/issues/12215
2022-03-21 13:05:48 -07:00
Dave Protasowski 80be89b59e
update dependencies - k8s v0.23 libs (#12753)
* update deps and codegen

* corev1.Handler => corev1.ProbeHandler

* kind e2e workflow now requires golang 1.17

* update schema config
2022-03-18 12:04:19 -07:00
Dave Protasowski 604cd18531
update boilerplate year (#12699)
* update boilerplate year

* update copyright of generated code

* Update protofiles with new boilerplate

Ran with versions
protoc - 3.19.4
protoc-gen-gogofaster - v1.3.2

* run protobuf gen with older gogofaster version
2022-03-07 22:15:05 -08:00
kobayashi 76bdf86915
Fix broken links (#12472) 2022-01-07 07:38:27 -08:00
Evan Anderson 238f232a34
Integrate nscert controller into the main controller (#12174)
* Consolidate serving-nscert controller into main controller.

* Fix up e2e tests

* Remove wildcard cert stuff from generate-yamls and install.

* Fix lint.

* Address nak3 feedback; remove a no-longer-needed utility program

* Clean up the rest of SERVING_NSCERT_YAML (which was an empty file).

* Remove the rest of SERVING_NSCERT_YAML
2021-10-28 17:27:51 -07:00
knative-automation ebdd09e022
Update actions (#12140)
Signed-off-by: Knative Automation <automation@knative.team>
2021-10-15 13:10:23 -07:00
Paul Schweigert 45dda6b50d
Allow setting spec.template.spec.automountServiceAccountToken in PodSpec (#11723)
* allow setting spec.template.spec.automountServiceAccountToken in PodSpec

* only allow setting to false

* preventing panic

* actually preventing panic

* updating schema

* fixing logic to deny when set to true

* gofmt

* using helper function for &false, removing unneeded disallowed block
2021-07-28 13:14:56 -07:00
Julian Friedman 5a51323d83
Add v1beta1 version of DomainMapping crd (#11682)
* Add v1beta1 version of DomainMapping crd

* Keep v1alpha1 as storage version for a release

* Update copyright year

* Rerun codegen after rebase

* Regenerate with new boilerplate
2021-07-23 07:20:44 -07:00
Mahamed d068a6dacb
Add `app.kubernetes.io` labels (#11655)
* add app.kubernetes.io labels

* fix typo

* adjust deployment selectors

* fix webhook selector

* adjust labels and revert incorrect selector changes

* fix typos in part-of labels

Co-authored-by: Dave Protasowski <dprotaso@gmail.com>

* add labels removed from resource

* fix more typos in part-of labels

Co-authored-by: Dave Protasowski <dprotaso@gmail.com>

* add removed labels back

* add final missing label

Co-authored-by: Dave Protasowski <dprotaso@gmail.com>
2021-07-22 16:28:43 -07:00
Stavros Kontopoulos 317cde6f76
Add support for emptyDir volume type (#11669)
* support emptyDir volume

* fixes

* reorder feature
2021-07-17 19:26:52 -07:00
Julian Friedman 770a40f59d
Update boilerplate copyright year (#11687)
* Update boilerplate copyright year

* Regen protobufs
2021-07-16 09:38:09 -07:00
Julian Friedman 478b5e7882
Move DomainMapping feature to beta (#11573)
* Move DomainMapping feature to beta

Adds the domain mapping yamls to config/core so that they are built in
to the main serving yaml. This does not combine the controller and
webhook binaries (this will only happen when the feature is GA) so
it is still possible to opt out of domain mapping by reducing replica
count of the relevant controller/webhook to zero and removing access to
the CRD.

* Dont build domainmapping yaml since its built in to core yaml

* Cleanup dangling reference to removed yaml

* Update codegen

* Move tests to beta suite
2021-06-23 11:16:44 -07:00
Dave Protasowski 812e62c30e
use go tooling to install forked binary (#11463)
* use go tooling to install forked binary

* invoke go get -d on the right package

* fix trailing whitespace
2021-06-07 08:02:48 -07:00
Paul Schweigert 51bfe38f9d
add feature gate to allow adding capabilities to securityContext (#11410) 2021-06-03 07:53:44 -07:00
Markus Thömmes 52a823e7e6
Automate schema creation via update-codegen.sh. (#11450) 2021-06-02 14:42:44 -07:00
Markus Thömmes aa2d324cb3
Make schema generation idempotent (#11445)
* Make schema generation idempotent

* Do things without readlink -f
2021-06-02 03:16:30 -07:00
Markus Thömmes 07e6fc11c2
Move schemapatch config here for easier access (#11407)
* Move schemapatch config here for easier access

* Comment on preserveUnknownFields reasons

* Move config file and add comment
2021-06-01 07:47:38 -07:00
Markus Thömmes f9356e3d8a
Update schema generator as a bug has been fixed (#11406) 2021-05-25 08:53:38 -07:00
Dave Protasowski e2a823714b
e2e - drop imperative bash yaml for declarative ytt/kapp (#11175)
* e2e - drop imperative bash yaml for declarative ytt/kapp

* don't override knative_setup

* fix namespace of some test-resources

* move ingress class to a property file

* change overlay file names to indicate which configmaps they overlay

* domain-mapping controller is HA

* better coordination between generate-yamls.sh and our e2e scripts

* post-install job support

* fix autotls tests

* fix kourier - do a global search when replacing the system namespace

* drop setting ambassador namespace

* pin kapp to a specific sha

* first pass at upgrade test fixes

* drop ignore-unknown-comments flag - no longer needed with v0.32.0

* fix istio latest-release install

* hardcode kapp app names
upgrade tests change the E2E_SCRIPT name thus we can end up with two installations

* kind tweaks

* drop unused constant

* minor cleanup

* fix stray # in istio mesh ytt file

* drop bash wait since kapp will do this for us

* pull back the global rename and just do it where we need to
otherwise we end up with cluster roles with weird names

* apply injection to namespaces

* custom-yamls now accepts the generated env file output from generate-yamls.sh

* include peer auth for net-certmanager webhook

* fix kong ingress value
2021-04-30 14:07:56 -07:00
Markus Thömmes 101c6f1efa
Add complete schemas to all CRDs (#11244)
* Setup CRD generation machinery and generate initial schemas

* Add filtered PodSpec schema

* Fix embedded types

* Fix things

* Allow preservation for some more types

* Add comments

* Add an explicit comment towards our patched version

* Detach update-codegen from schema generation for now

* Drop incorrect default descriptions

* Drop unnecessary git based rollback

* Simplify further

* Drop now unnecessary comment

* Reorder schema and manual fields

* Drop feature flagged fields

* Remove fat fingering

* Fix leftovers
2021-04-29 18:09:55 -07:00
Julian Friedman 4ac36cef7b
Add API doc generation to codegen (#11238)
This generates api docs for api types when we do all the other code
generation. Doing this is part of trying to simplify the docs release
process, and will remove the need to manually generate these when
releasing docs, which has been a source of pain in docs release. Since
we already need to run update-codegen when modifying api types, there
shouldn't be any significant new friction in doing this (on my machine
time to run codegen went from 4m5s to 4m19s, so you get 14 more seconds
to refresh your coffee).

As an additional bonus, this means you can view API docs for a
particular serving version or commit via github in docs/serving-api.md,
which is nice.
2021-04-21 15:54:37 -07:00
Markus Thömmes a4f70f6768
Cleanup deepcopygen annotations and calls (#11165) 2021-04-12 15:03:59 -07:00
Evan Anderson 6396164e80
Update OWNERS_ALIASES to match autogen in community (#11103)
* Update OWNERS_ALIASES to match autogen in community

* Fixup missing/mis-named groups
2021-04-08 10:47:50 -07:00
Markus Thömmes 491f288b3f
Drop master references to knative repos (#10918) 2021-03-10 09:40:25 -08:00
Martin Gencur d2f294443d
Migrate upgrade tests to the new framework (#10216)
* Migrate upgrade tests to using pkg/test/upgrade framework

* Convert AssertAutoscaleUpToNumPods and inner functions to helper
functions that
return error instead of calling t.Fatal to fail the current test.
Avoid using *testing.T
so that these functions can be reused outside of tests or span
multiple tests.
* The autoscaler helper functions are used in upgrade tests where
"setup" and
"verify" phases run within different tests. Pull test.EnsureTearDown
from SetupSvc to ensure
that a kservice is not destroyed at the end of the first phase
("setup") but
remains active until "verify" phase. This is ensured by calling
EnsureTearDown later in the
  "verify" phase.
* Adjust Bash scripts to avoid unbound variable errors during upgrade
tests exexution (due
  to using -u flag by the upgrade framework).

* Use umbrella functions for individual groups of tests

That's for easy reuse in other repos such as knative/operator

* Define curPods and targetPods constants in upgrade tests

* Fix imports and licences

* Fix lint - comments on new exported functions

* Split AssertAutoscaleUpToNumPods into setup and wait parts

* Pass errgroup by reference

* Fix lint error

* Move logf into TestContext

* Remaining fixes for moving logf to TestContext

* Call logf on context directly

* Update readme

* Remove the comment and fix imports

* Update modules after running update-codegen

* Do not upgrade Ingress when upgrading Knative

* autoscale and prober tests will fail if ingress is replaced during
upgrade

* Pass around func() error instead of errGroup

* Mark a few functions as t.Helper()

* Fix codegen
2021-01-05 01:00:31 -08:00
Scott Nichols 8813e5c35c
Integrate the gopath hacks to allow for codegen anywhere. (#10245) 2020-12-02 16:21:08 -08:00
Dave Protasowski 0f1fb2b663
bumping k8s deps to v0.18.12 (#10131)
* bump knative & k8s deps, drop replace directives

* drop k8s bump script
2020-11-17 19:43:51 -08:00
Scott Nichols eebe5f37d7
drop vendoring pkg/testutils (#10010) 2020-11-02 13:29:04 -08:00