open-nomad/scheduler
Danielle Lancashire 78b61de45f
config: Hoist volume.config.source into volume
Currently, using a Volume in a job uses the following configuration:

```
volume "alias-name" {
  type = "volume-type"
  read_only = true

  config {
    source = "host_volume_name"
  }
}
```

This commit migrates to the following:

```
volume "alias-name" {
  type = "volume-type"
  source = "host_volume_name"
  read_only = true
}
```

The original design was based due to being uncertain about the future of storage
plugins, and to allow maxium flexibility.

However, this causes a few issues, namely:
- We frequently need to parse this configuration during submission,
scheduling, and mounting
- It complicates the configuration from and end users perspective
- It complicates the ability to do validation

As we understand the problem space of CSI a little more, it has become
clear that we won't need the `source` to be in config, as it will be
used in the majority of cases:

- Host Volumes: Always need a source
- Preallocated CSI Volumes: Always needs a source from a volume or claim name
- Dynamic Persistent CSI Volumes*: Always needs a source to attach the volumes
                                   to for managing upgrades and to avoid dangling.
- Dynamic Ephemeral CSI Volumes*: Less thought out, but `source` will probably point
                                  to the plugin name, and a `config` block will
                                  allow you to pass meta to the plugin. Or will
                                  point to a pre-configured ephemeral config.
*If implemented

The new design simplifies this by merging the source into the volume
stanza to solve the above issues with usability, performance, and error
handling.
2019-09-13 04:37:59 +02:00
..
annotate.go Show canaries on plan 2017-07-07 12:03:11 -07:00
annotate_test.go Deprecate IOPS 2018-12-06 15:09:26 -08:00
context.go Remove compat code associated with many previous versions of nomad 2019-06-25 19:05:25 -05:00
context_test.go Fix more tests 2019-06-26 16:30:53 -05:00
device.go Change types of weights on spread/affinity 2019-01-30 12:20:38 -08:00
device_test.go Change types of weights on spread/affinity 2019-01-30 12:20:38 -08:00
feasible.go config: Hoist volume.config.source into volume 2019-09-13 04:37:59 +02:00
feasible_test.go config: Hoist volume.config.source into volume 2019-09-13 04:37:59 +02:00
generic_sched.go Fix inplace updates bug with group level networks 2019-09-05 18:37:24 -05:00
generic_sched_oss.go Refactor scheduler package to enable preemption for batch/service jobs 2019-04-10 20:24:01 -05:00
generic_sched_test.go Stop allocs to be rescheduled 2019-06-06 17:27:12 -04:00
preemption.go Only preempt for network when there is a network 2019-06-07 18:55:55 -04:00
preemption_test.go Scheduler changes to support network at task group level 2019-07-31 01:04:08 -04:00
propertyset.go server 2018-09-15 16:23:13 -07:00
rank.go fix failing tests 2019-07-31 01:04:07 -04:00
rank_test.go Code review feedback 2019-07-31 01:04:08 -04:00
reconcile.go add default update stanza and max_parallel=0 disables deployments (#6191) 2019-09-02 10:30:09 -07:00
reconcile_test.go add default update stanza and max_parallel=0 disables deployments (#6191) 2019-09-02 10:30:09 -07:00
reconcile_util.go Stop allocs to be rescheduled 2019-06-06 17:27:12 -04:00
reconcile_util_test.go Fix linting 2018-03-28 12:26:28 -05:00
scheduler.go Remove allowPlanOptimization from schedulers 2019-04-23 09:18:02 -07:00
scheduler_oss.go sync 2017-10-13 14:36:02 -07:00
select.go Implement affinity support in generic scheduler 2018-09-04 16:10:11 -05:00
select_test.go Implement affinity support in generic scheduler 2018-09-04 16:10:11 -05:00
spread.go Fix comment and assert score in test case 2019-05-15 12:35:57 -05:00
spread_test.go Fix comment and assert score in test case 2019-05-15 12:35:57 -05:00
stack.go scheduler: Add a feasability checker for Host Vols 2019-08-12 15:39:08 +02:00
stack_not_ent.go sync 2017-10-13 14:36:02 -07:00
stack_oss.go scheduler: Add a feasability checker for Host Vols 2019-08-12 15:39:08 +02:00
stack_test.go renames 2018-10-04 14:57:25 -07:00
system_sched.go Fix inplace updates bug with group level networks 2019-09-05 18:37:24 -05:00
system_sched_test.go system_sched & test cleanup comments 2019-05-01 12:25:26 -04:00
testing.go Add comments to functions, and use require instead of assert 2019-04-23 09:57:21 -07:00
util.go update comment 2019-09-05 18:43:30 -05:00
util_test.go Remove allowPlanOptimization from schedulers 2019-04-23 09:18:02 -07:00