Skip to content

Cannot set "resources" on a container revision spec #2099

Closed

Description

@berndtj

/area API
/kind feature

Expected Behavior

You should be able to specify the resources on a function from the revision spec. This value would then override the default.

Actual Behavior

must not set the field(s): spec.runLatest.configuration.revisionTemplate.spec.container.resources

Steps to Reproduce the Problem

  1. Create a revision spec (the below is part of a service spec):
RevisionTemplate: knserve.RevisionTemplateSpec{
	Spec: knserve.RevisionSpec{
		Container: corev1.Container{
			Image:          function.FunctionImageURL,
			Env:            envVars,
			LivenessProbe:  probe,
			ReadinessProbe: probe,
			Resources: corev1.ResourceRequirements{
				Requests: corev1.ResourceList{
					corev1.ResourceCPU: resource.MustParse("100m"),
				},
			},
		},
		ContainerConcurrency: 1,
		// TODO define a service account per function
		ServiceAccountName: buildCfg.ServiceAccount,
	},
},
  1. Submit revision/service
  2. spec is rejected: must not set the field(s): spec.runLatest.configuration.revisionTemplate.spec.container.resources

Additional Info

related: #1998

Activity

  1. added
    area/API
    area/build
    area/test-and-release
    kind/question
    kind/bug
    kind/cleanup
    kind/doc
    kind/feature
    kind/process
    kind/spec
    on Sep 27, 2018
  2. evankanderson commented on Sep 28, 2018

    @evankanderson
    Member

    /remove-area autoscale
    /remove-area build
    /remove-area monitoring
    /remove-area networking
    /remove-area test-and-release
    /remove-kind question
    /remove-kind bug
    /remove-kind process
    /remove-kind cleanup

  3. 3 remaining items

  4. removed
    area/test-and-release
    kind/question
    kind/bug
    kind/process
    kind/cleanup
    on Sep 28, 2018
  5. MissingRoberto commented on Sep 28, 2018

    @MissingRoberto

    /assign @jszroberto

  6. added a commit that references this issue on Nov 9, 2018
  7. alculquicondor commented on Nov 26, 2018

    @alculquicondor
    Contributor

    Is this still being looked at?

  8. evankanderson commented on Nov 26, 2018

    @evankanderson
    Member

    Take a look at #2117, which has a fix for this but is awaiting passing unit tests.

  9. added this to the Serving 0.3 milestone on Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/APIkind/dockind/featurekind/spec

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions