Commit Graph

61 Commits

Author SHA1 Message Date
Timo Reimann
604dfb3197 Relax restrictions on environment variable names.
The POSIX standard restricts environment variable names to uppercase
letters, digits, and the underscore character in shell contexts only.
For generic application usage, it is stated that all other characters
shall be tolerated.

This change relaxes the rules to some degree. Namely, we stop requiring
environment variable names to be strict C_IDENTIFIERS and start
permitting lowercase, dot, and dash characters.

Public container images using environment variable names beyond the
shell-only context can benefit from this relaxation. Elasticsearch is
one popular example.
2017-07-28 22:11:26 +02:00
Jordan Liggitt
e8f2879bfd
Allow setting service account with kubectl run 2017-07-15 12:37:10 -04:00
Alexander Campbell
ef9ae61240 kubectl: simplify code with help of linter 2017-06-23 09:49:30 -07:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
xiangpengzhao
0b8e25cdbf Assign label to pod when exec 'kubectl run' command with flags "--expose=true" and "--restart=Never" 2017-04-26 11:53:33 +08:00
Maciej Szulik
aa4390750c Introduce new generator for apps/v1beta1 deployments 2017-03-10 12:08:01 +01:00
Maciej Szulik
1049dad0a4 Switch generators to use versioned objects 2017-03-10 12:08:01 +01:00
Maciej Szulik
c272630b1b Deployments under apps/v1beta1 with new defaults 2017-03-01 15:14:41 +01:00
Dr. Stefan Schimanski
bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
Clayton Coleman
9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Maciej Szulik
9f064c57ce Remove extensions/v1beta1 Job 2016-12-17 00:07:24 +01:00
Clayton Coleman
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Maciej Szulik
41d88d30dd Rename ScheduledJob to CronJob 2016-11-07 10:14:12 +01:00
lojies
9ef3ef3f17 use len > 0 to replace port > 0 2016-09-28 10:23:25 +08:00
lojies
ef87972835 add port validate when --port is set or --expose=true 2016-09-01 17:24:02 +08:00
AdoHe
ca315e317b kubectl run add pull-policy flag to control image pull policy 2016-08-17 11:26:27 +08:00
Davanum Srinivas
ecda7c60c1 Allow empty value for env in kubectl run
Fixes #28734
2016-08-05 08:47:53 -04:00
Maciej Szulik
b5c68a9015 ScheduledJob kubectl changes 2016-08-03 17:25:37 +02:00
Tim Hockin
189d4a5159 Make CIdentifier return error strings 2016-07-02 17:32:05 -07:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Gyu-Ho Lee
a14a288c3f pkg/kubectl: preallocate slice
To avoid slice growth with append operations.
2016-05-29 02:09:39 -07:00
Clayton Coleman
5e4308f91d
Update use of Quantity in other classes 2016-05-19 08:41:43 -04:00
Clayton Coleman
fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Maciej Szulik
a3b4447305 Move internal types of job from pkg/apis/extensions to pkg/apis/batch 2016-04-25 11:03:54 +02:00
Maciej Szulik
de83631768 Added job/v1 generator to kubectl run 2016-03-10 19:56:57 +01:00
Eric Tune
875755f992 Added Selector Generation to Job.
Added selector generation to Job's
strategy.Validate, right before validation.
Can't do in defaulting since UID is not known.

Added a validation to Job to ensure that the generated
labels and selector are correct when generation was requested.
This happens right after generation, but validation is in a better
place to return an error.

Adds "manualSelector" field to batch/v1 Job to control selector generation.
Adds same field to extensions/__internal.  Conversion between those two
is automatic.

Adds "autoSelector" field to extensions/v1beta1 Job.  Used for storing batch/v1 Jobs
    - Default for v1 is to do generation.
    - Default for v1beta1 is to not do it.
    - In both cases, unset == false == do the default thing.

Release notes:
Added batch/v1 group, which contains just Job, and which is the next
version of extensions/v1beta1 Job.

The changes from the previous version are:
- Users no longer need to ensure labels on their pod template are unique to the enclosing
  job (but may add labels as needed for categorization).
- In v1beta1, job.spec.selector was defaulted from pod labels, with the user responsible for uniqueness.
  In v1, a unique label is generated and added to the pod template, and used as the selector (other
  labels added by user stay on pod template, but need not be used by selector).
- a new field called "manualSelector" field exists to control whether the new behavior is used,
  versus a more error-prone but more flexible "manual" (not generated) seletor.  Most users
  will not need to use this field and should leave it unset.

Users who are creating extensions.Job go objects and then posting them using the go client
will see a change in the default behavior.  They need to either stop providing a selector (relying on
selector generation) or else specify "spec.manualSelector" until they are ready to do the former.
2016-02-25 09:28:07 -08:00
Madhusudan.C.S
ed7ad6dcf3 Make deployments work. 2016-02-08 21:27:49 -08:00
Madhusudan.C.S
518f08aa7c Move Deployments to ReplicaSets and switch the Deployment selector to the new LabelSelector.
Update the Deployments' API types, defaulting code, conversions, helpers
and validation to use ReplicaSets instead of ReplicationControllers and
LabelSelector instead of map[string]string for selectors.

Also update the Deployment controller, registry, kubectl subcommands,
client listers package and e2e tests to use ReplicaSets and
LabelSelector for Deployments.
2016-02-08 21:27:38 -08:00
Janet Kuo
7e9fb97b7d Remove UniqueLabelKey from deployment spec 2016-02-05 16:21:44 -08:00
Eric Tune
6133cb1f21 Move extensions.LabelSelector to unversioned.
Move type LabelSelector and type LabelSelectorRequirement from pkg/apis/extensions
This avoids an import loop when Job (and later DaemonSet, Deployment, ReplicaSet)
are moved out of extensions to new api groups.

Also Move LabelSelectorAsSelector utility from pkg/apis/extensions/ to pkg/api/unversioned/
Also its test.
Also LabelSelectorOp* constants.
Also the pkg/apis/extensions/validation functions ValidateLabelSelectorRequirement and
ValidateLabelSelector move to pkg/api/unversioned

The related type in pkg/apis/extensions/v1beta1/ is staying there.  I might move
it in another PR if neccessary.
2016-02-04 13:46:34 -08:00
mqliang
640ce23930 make env variable parsing more robust 2016-01-14 10:30:15 +08:00
k8s-merge-robot
51e8c2e5f8 Merge pull request #17841 from mqliang/constant
Auto commit by PR queue bot
2015-12-13 23:40:27 -08:00
mqliang
0fd51b9e72 make 'deployment.kubernetes.io/podTemplateHash' as constant 2015-12-05 11:17:12 +08:00
Salvatore Dario Minonne
80575c3093 renaming PodSelector to LabelSelector 2015-12-04 09:49:08 +01:00
Janet Kuo
c0c02c95c4 kubectl run to produce deployment and job 2015-11-24 10:21:31 -08:00
Clayton Coleman
e9a465d635 Make kubectl run attach behave like docker run
Have stdin closed by default, can be left open with --leave-stdin-open.
Add e2e tests for the behavior.
2015-10-16 20:33:51 -04:00
tummychow
a21c52a766 Move util/validation files to their own package 2015-09-13 00:46:52 -07:00
derekwaynecarr
295b8cdf16 Add requests and limits to kubectl run 2015-09-11 10:57:21 -04:00
feihujiang
84e94e39cd Support setting env vars in kubectl run 2015-09-08 14:31:29 +08:00
Brendan Burns
586931fe16 Add optional arguments to kubectl run ... 2015-08-13 09:41:51 -07:00
Brendan Burns
e42d6aa255 Add --restart support to kubectl run 2015-08-07 13:20:09 -07:00
Brendan Burns
9ac50b4980 Add interactive run that combines run and attach. 2015-08-06 20:20:14 -07:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
derekwaynecarr
b69f1ff5bd Name is a required parameter for kubectl run, default-name is not 2015-06-01 14:05:05 -04:00
kargakis
6c85040cef expose: Use separate parameters for default and custom name 2015-05-28 11:03:16 +02:00
Anastasis Andronidis
d4a47bdb9e rename run-container to run in kubectl 2015-05-27 19:07:17 +02:00