Commit Graph

2833 Commits (c14af5c023f7c614bb17b03762ff50114bb5a9b0)

Author SHA1 Message Date
Hieu LE c14af5c023 Register default quota policies in code
This commit uses the existing policy-in-code module to move all
default policies for quotas into code. This commit also adds
helpful documentation about each API those policies protect,
which will be generated in sample policy files.

Co-authored-By: Dai Dang-Van <daidv@vn.fujitsu.com>
Implements: blueprint policy-in-code

Change-Id: I2fbd7577545ed08dee10064d321e8c6941324b5d
6 years ago
Hieu LE 38a8fed31a Register default cluster template policies in code
This commit uses the existing policy-in-code module to move all
default policies for cluster templates into code. This commit also adds
helpful documentation about each API those policies protect,
which will be generated in sample policy files.

Co-authored-By: Dai Dang-Van <daidv@vn.fujitsu.com>
Implements: blueprint policy-in-code

Change-Id: I9a8176ea20e3c925441473d1d84db3a73edca7a5
6 years ago
Hieu LE 0d36f8b8bd Register default cluster policies in code
This commit uses the existing policy-in-code module to move all
default policies for clusters into code. This commit also adds
helpful documetation about each API those policies protect,
which will be generated in sample policy files.

Change-Id: I36e69fe930505c2777f4376be1f6ddf17016998f
Co-authored-By: Dai Dang-Van <daidv@vn.fujitsu.com>
Implements: blueprint policy-in-code
6 years ago
Hieu LE 1cbb1d451c Register default baymodel policies in code
This commit uses the existing policy-in-code module to move all
default policies for baymodels into code. This commit also adds
helpful documetation about each API those policies protect, which
will be generated in sample policy files.

Change-Id: Ia4409ff712d0e64985d9565e11671b33c8ac9ddf
Co-authored-By: Dai Dang-Van <daidv@vn.fujitsu.com>
Implements: blueprint policy-in-code
6 years ago
Hieu LE ac0756e60f Register default bay policies in code
This commit uses the existing policy-in-code module to move all
default policies for bays into code. This commit also adds helpful
documetation about each API those policies protect, which will be
generated in sample policy files.

Change-Id: I4221ed56146ed952781f5f38bc4344d8a0d07881
Co-authored-By: Dai Dang-Van <daidv@vn.fujitsu.com>
Implements: blueprint policy-in-code
6 years ago
Hieu LE e06004d9f5 Implement basic policy module in code
This change prepares the magnum project to start implementing
policies in code. Subsequent patches will register more magnum
policies in code and remove the corresponding entry from the
policy file maintained in source.

This is part of a community effort to provide better user
experience for those having to maintain RBAC policy. More
information on this effort can be found below:
https://governance.openstack.org/tc/goals/queens/policy-in-code.html

Change-Id: I0e2b34067ea1e4d5868df544a9f65ae3f1944c43
Co-authored-By: Dai Dang-Van <daidv@vn.fujitsu.com>
Implements: blueprint policy-in-code
6 years ago
yatin 0b49f38069 Migrate to Zuul v3
Change-Id: I0d5d6a9038c9a150a74df955bccb3f9ed263b736
6 years ago
Jenkins 732b45ccb3 Merge "Stop using deprecated 'message' attribute in Exception" 6 years ago
Jenkins ed8967032b Merge "Fix prometheus scrape configuration" 6 years ago
Jenkins 2bf7e34498 Merge "Allow master_flavor_id on cluster create" 6 years ago
Ricardo Rocha 446b159349 Allow master_flavor_id on cluster create
Add master_flavor_id as an option during cluster create. If not given,
the default is taken from the cluster template.

Add master_flavor_id in the Cluster object and use that instead
of the one from ClusterTemplate.

Update both magnum and magnum cli documentation to reflect the above changes.

Partial-Bug: #1699247
Change-Id: Id1d973167b381538121583a0a9691304b39e98de
6 years ago
Jenkins f6632a5cd5 Merge "k8s_fedora: Add container_infra_prefix label" 6 years ago
Spyros Trigazis 4aade351b0 Fix prometheus scrape configuration
Make prometheus configuration compatible with 1.7.3 or greater.
The new config matches the one in the pormetheus kubernetes
example [1] minus the configuration for ingress that we don't
deploy.

[1] https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml
Closes-Bug: #1719187

Change-Id: Ied8b8d8fb610e5ecba18e37f98dd1a4c9bddbf30
6 years ago
Spyros Trigazis 69bb03fcbe k8s_fedora: Add container_infra_prefix label
Add a label to prefix all container image use by magnum:
* kubernetes components
* coredns
* node-exporter
* kubernetes-dashboard

Using this label all containers will be pulled from the specified
registry and group in the registry.

TODO:
* grafana
* prometheus

Closes-Bug: #1712810
Change-Id: Iefe02f5ebc97787ee80431e0f16f73ae8444bdc0
6 years ago
Mohammed Naser 8ce15c4510 Avoid running periodic processes inside each worker process
The periodic jobs are currently getting registered per each worker
which means that in cases with large number of workers, the APIs
for services such as Heat and Keystone will be hit very hard.

This patch resolves this issue by registering the jobs only to the
main process, ensuring that they run once per instance (or group
of workers).

Closes-Bug: #1702349

Change-Id: If9e13effc14fd35e646d02bb4f568e79786aa958
6 years ago
Jenkins bbe6757801 Merge "Update CoreDNS to 011" 6 years ago
Spyros Trigazis 68d7b87a0b Update CoreDNS to 011
Update CoreDNS to version 011 which includes a fix [0]
for kubernetes srv and update the Corefile appropriately [1].

[0] https://github.com/coredns/coredns/pull/823
[1] https://github.com/coredns/deployment/blob/master/kubernetes/coredns.yaml.sed#L12
Closes-Bug: #1717238

Change-Id: Ibeaa01578874335ddb70ac178ff708c6b953f129
6 years ago
Spyros Trigazis fe6286e76f k8s: Fix node-exporter manifest
When writing the node-exporter manifest, make sure that
the directory exists.

Change-Id: I41be5c09890bd2c9a063d4942f03305ff690ec4b
Closes-Bug: #1716697
6 years ago
Jenkins 1fbb3a1b6c Merge "Use newer location for iso8601 UTC" 6 years ago
Jenkins 04b4df0d74 Merge "Allow labels on cluster create" 6 years ago
Sean McGinnis 640217d22e Use newer location for iso8601 UTC
Newer versions have moved from iso8601.iso8601.Utc() to
just iso8601.UTC, causing tests to fail under py35.

Change-Id: I59c771b6803866282912c2067ff5ed25bba13626
Closes-bug: #1715486
6 years ago
Jenkins 62afc249d1 Merge "Clean-up server names in drivers" 6 years ago
Jenkins e7959ae5a3 Merge "Fix no_proxy evaluation for Swarm clusters" 6 years ago
Jenkins 29fcec1849 Merge "Deal with db_exc.DBDuplicate of conductor startup" 6 years ago
Jenkins f25441d981 Merge "Add attribute 'disabled' for service-list" 6 years ago
Jenkins b16b3ec528 Merge "Remove unused config periodic_global_stack_list" 6 years ago
Jenkins 79460caffa Merge "Remove TENANT_NAME from /etc/sysconfig/heat-params" 6 years ago
Jenkins 26a0e8a9b6 Merge "Fix usage of --kubelet-preferred-address arg for apiserver" 6 years ago
chestack 048400bd4b Remove TENANT_NAME from /etc/sysconfig/heat-params
1. It will fail to create cluster if there is chinese in tenant name
2. TENANT_NAME is unnecessary after changing to trustee

this patch is for k8s_fedora_atomic and k8s_fedora_ironic

Change-Id: Ie072f183110ae95861fb3694a913a3a4526549fb
Close-Bug: #1711308
6 years ago
Michael Tupitsyn 35dc923d66 Fix no_proxy evaluation for Swarm clusters
At the moment, no_proxy variable is evaluated separately for docker
daemon and for swarm-manager container running in docker. Evaluated
value for swarm-manager is not getting into cloud-init script, because
$NODE_PROXY token is getting replaced by Heat str_replace function.
This commit is intended to unify NO_PROXY evaluation and also fix the
issue with swarm-manager.

Related-Bug: #1647815
Related-Bug: #1632698
Related-Bug: #1660562
Change-Id: I336024265008b6cae308bf7b614476b71b81fa01
6 years ago
chestack afa32e8672 Trivial typo fix
found it when work on something else

Change-Id: Ie13544fb4fb5ab8a8ebf0e2c0c6b02d87cebb189
6 years ago
Mathieu Velten 46255dd4b1 Add a kube_tag label to control the k8s containers to pull
Separate the tag from which to pull from the kubernetes version.
With the current state the tag and the version happen to be the
the same. But, it is not decided yet in the fedoraproject how the
images are going to be tag. Finally, operators might want to try
their own container images with custom tags.

Depends-On: Icddb8ed1598f2ba1f782622f86fb6083953c3b3f
Implements: blueprint run-kube-as-container

Change-Id: I4c4bc055d7df5e65aede93464bff51e6d5971504
6 years ago
Mathieu Velten 005eeb575d Launch kube-proxy as a system container
Following up of https://review.openstack.org/#/c/487943

Depends-On: I9a7d00cddb456b885b6de28cfb3d33d2e16cc348
Implements: blueprint run-kube-as-container

Change-Id: Icddb8ed1598f2ba1f782622f86fb6083953c3b3f
6 years ago
Mathieu Velten d003e80a3a Launch k8s scheduler & controller-manager as system containers
Following up of https://review.openstack.org/#/c/487357

Depends-On: I22918c0b06ca34d96ee68ac43fabcd5c0b281950
Implements: blueprint run-kube-as-container

Change-Id: I9a7d00cddb456b885b6de28cfb3d33d2e16cc348
6 years ago
Mathieu Velten 024f2c0241 Use atomic containers for kubelet & apiserver
Use system containers based on fedora rawhide from
projectatomic [1]. Until the fedoraproject updated
the tags properly we mirror our containers in [2].
System containers are meant to be drop in replacements
of the fedora kubernetes binaries.

Update k8s to 1.7.4 to match the version in the containers.

[1] https://github.com/projectatomic/atomic-system-containers
[2] https://hub.docker.com/r/openstackmagnum/

Implements: blueprint run-kube-as-container

Change-Id: I22918c0b06ca34d96ee68ac43fabcd5c0b281950
6 years ago
Jenkins f9c4a1bb53 Merge "Remove /etc/ssl/certs in the controller manager pod" 6 years ago
Jenkins 2504d64f93 Merge "Remove repeated auth_url" 6 years ago
Ricardo Rocha 3d04ed4cbb Allow labels on cluster create
Add labels as an option during cluster create. If not given,
the default is taken from the cluster template.

Add labels in the Cluster object and use that instead
of the one from ClusterTemplate.

Update both magnum and magnum cli documentation to reflect the above changes.

Partial-Bug: #1697651
Implements: blueprint flatten-attributes
Change-Id: I8990c78433dcbbca5bc4aa121678b02636346802
6 years ago
Mohammed Naser ae15aa6c28 Remove /etc/ssl/certs in the controller manager pod
For system such as Fedora Atomic, the CA bundle files which are
contained in /etc/ssl/certs are symbolic links to /etc/pki. When
configuring the controller manager to use an SSL endpoint, it will
raise an error as it is unable to authenticate the SSL endpoint.

This patch removes the host mount at /etc/ssl/certs.  The Hyperkube
images already ship a collection of CAs which are likely good for
all needs.

Closes-Bug: #1708452

Change-Id: Ife2b60d1968482a8c3ab9b44abbe401c6230881c
6 years ago
Mark Goddard ddde90e07c Add default for [cinder]default_docker_volume_type
When creating a kubernetes cluster on baremetal & fedora, if the cluster
template does not have a docker_volume_type defined, the following error
is seen:

InvalidParameterValue: ERROR: The Parameter (docker_volume_type) was not
provided.

Cinder isn't mandatory, and neither is the docker_volume_type cluster
template parameter, so it shouldn't need to be set.

This change adds a default value of an empty string for the option
[cinder]default_docker_volume_type, which allows the cluster to be
created.

Change-Id: I4416e2826e4a14a11b93d55d342e4de9b3dc12d7
Closes-Bug: #1702075
6 years ago
Spyros Trigazis 4fb91cc109 tests: Use swarm-mode for api tests
* Swarm-mode is the fastest cluster to deploy since it doesn't
  require to pull anything from outside.
* Add the output nodes for swarm-mode too.
* Disable copy logs (I think a better practice is to copy logs
  on demand).
* Don't run test_create_list_sign_delete_clusters, because it is
  very unstable on the CI.

Partially-Implements: blueprint swarm-mode-support

2nd commit message:

Update to Fedora Atomic 26

This patch moves the current master to test against Fedora Atomic 26,
in addition, it switches to downloading from Fedora mirrors.

2nd-Change-Id: I9a97c0eb78b2c9d10e8be1501babb19e73ee70c1

3rd commit message:

Set default iptables FORWARD policy to ACCEPT

With the release of Docker 1.13 which is available in Fedora
Atomic 26, it no longer sets the policy of the FORWARD chain
to ACCEPT[1].  Therefore, CNI networking such as Flannel will
cease to work.

This patch sets the policy to ACCEPT so that traffic can work
once again for deployments which are based on Docker versions
which are newer than 1.13

[1]: https://github.com/moby/moby/pull/28257

3rd-Change-Id: I1457602748619f38f87542fc01a2996ee80e58b7
Closes-Bug: #1708454

Co-Authored-By: Mohammed Naser <mnaser@vexxhost.com>
Change-Id: I86d4dcc94fff622be4ee2acc8dd60ed81bc5d433
6 years ago
Jenkins fdf6f57591 Merge "Remove deprecated usage of CORS.set_latent" 6 years ago
ChangBo Guo(gcb) f46cb1fc3d Remove deprecated usage of CORS.set_latent
Method set_latent is deprecated in favor of method set_defaults in
e9c3a23e845d8c53b266a3b2e4ca7fb0a5a0425a. We need remove the usage of
method set_latent. We just use these config options in tests, it works
well for unit tests without them, so it's safe to remove them.

Change-Id: I582c787395d6eef559d7914bea815440cc09c0e2
Closes-Bug: #1707151
6 years ago
chestack c22f9cd882 Deal with db_exc.DBDuplicate of conductor startup
we have enable multiple workers of magnum-conductor that
result in multiple processes save same DB entry concurrently.

This patch logs warning message instead of raising exception

Change-Id: I548d50bed5d80e96042f88039e880075e1bffc53
Close-Bug: #1711324
6 years ago
wangbo 136820caa5 Remove unused config periodic_global_stack_list
"periodic_global_stack_list" has not been using since patch:
https://review.openstack.org/#/c/405709.

Change-Id: If947fd063d77ba3924deb9c0f17fd1dbe2663f4a
6 years ago
yatin 8e36613965 Fix usage of --kubelet-preferred-address arg for apiserver
https://review.openstack.org/#/c/439906/ fixed it only for
tls based cluster, we need kubectl exec/log to work with
tls-disabled clusters as well.

Change-Id: Iae2d4bc9af7fc55ab0ce2db97c6b7cf61479a2ff
Closes-Bug: #1668337
6 years ago
yatin 8623776813 Copy service configurations also
This will help in verification of configuration and
troubleshooting ci failures

Change-Id: I81484c507781a8c96f95bc19f7afc591bc01827b
6 years ago
Mohammed Naser 5153d912b2
Clean-up server names in drivers
The instance type of servers at the moment can become quite long
due to the Heat autogenerated names.  This patch cleans up the names
so that they are shorter yet contain all the info needed to be able
to know where they belong to.

Change-Id: I5bcbe73f08844242d049b8408221da40d22cd3dc
6 years ago
PanFengyun 52ce6ae4d6 Remove repeated auth_url
Change-Id: I701a0a8406a8393114d79c54d9f415b601fece98
6 years ago
Jenkins 8582cedfd1 Merge "Don't poll heat if no stack exists" 6 years ago