Commit Graph

78 Commits

Author SHA1 Message Date
Michal Nasiadka 5c0c27807a Drop k8s_coreos_v1 driver
Change-Id: I64884677cf05c59c64988dfbee9bf22e97a3466b
2024-02-05 07:04:05 +00:00
ricolin eca79453c0 Fix Trust token scope for drivers
This fix driver token scope to make sure we use correct token
scope from Trust.

Change-Id: If5b31951959c7a141dc1cae5fefcabe4ebf438b3
2023-07-25 17:00:40 +08:00
Travis Holton e4e0843ed1 Remove stdout argument from coredns log
According to the documentation the first argument to log is either a
domain or a '.' (dot). The current setting of 'log stdout' appears to
blackhole query logs. The default output of log is stdout so the
argument would not be necessary.

Removing `stdout` allows coredns to send query logs to stdout.

Reference: https://coredns.io/plugins/log/

Change-Id: I7837015c37eb58ba43ff42cc8b647c717fa1c650
2022-10-26 16:31:03 +13:00
Ricardo Rocha 23c85bf040 Drop deprecated APIs for kube v1.16 support
Kubernetes v1.16 is dropping support for beta extensions/apps APIs for
Deployment, DaemonSet and ReplicaSet - as described in:
https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.15.md#deprecations-and-removals

Replace all occurrences with apps/v1.

Change-Id: Ib1d8b7672318538be7f0066832add29f7d066b92
Story: 2006459
Task: 36385
2019-10-01 17:49:23 +02:00
Mohammed Naser 2f2d05c826 k8s: stop introspecting instance name
We kept introspecting the name of the instance with the assumption
that the network always existed under .novalocal

This is not always the case, with certain variables changed inside
Neutron it is possible to control this, therefore, leading in failing
deploys.

With this change, we pass the instance name directly to the cluster
and therefore we always have the accurate name.

Task: 36160
Story: 2006371

Change-Id: I2ba32844b822ffc14da043e6ef7d071bb62a22ee
2019-08-07 21:24:06 +00:00
leledashenqi 26c28a03d2 Change docker image pulling policy from Always to IfNotPresent
Do not repeat pulling images when container recreate in magnum cluster.

Change-Id: Iaa618309375cf17d6511ae371a6a15a3345d4d6d
Story:2004644
Task:28595
2018-12-20 09:21:58 +08:00
Rick Cano 419a228503 Fixing CoreOS driver
Decoding ca on nodes

Change-Id: I4a30a348c1c0a62cb1a7b429b05878f321db92ed
2018-08-22 12:58:27 -04:00
Lingxian Kong 2cc57c5386 Use Octavia for LoadBalancer type service
In the OpenStack deployment with Octavia service enabled, the octavia
service should be used not only for master nodes high availability, but
also for k8s LoadBalancer type service implementation as well.

Change-Id: Ib61f59507510253794a4780a91e49aa6682c8039
Closes-Bug: #1770133
2018-05-30 15:36:24 +12:00
Spyros Trigazis 65dfb2009f Add openstack_ca_file configuration option
In the drivers section of magnum.conf add openstack_ca_file.
This file is expected to be a CA Certificate OR CA bundle
which will be passed on every node and it will be installed
on the host's CA bundle.

Update devstack plugin to use the ssl bundle if tls-proxy is
enabled.

Install the CA for drivers:
k8s_coreos_v1
k8s_fedora_atomic_v1
k8s_fedora_ironic_v1
mesos_ubuntu_v1
swarm_fedora_atomic_v1
swarm_fedora_atomic_v2

Add doc in troubleshooting-guide.

Add release notes.

Closes-Bug: #1580704
Partially-Implements: blueprint heat-agent
Change-Id: Id48fbea187da667a5e7334694c3ec17c8e2504db
2018-01-17 14:58:56 +00:00
Kirsten G b07b6f34d5 Add verify_ca configuration parameter
Added configuration parameter, verify_ca, to magnum.conf with default
value of True. This parameter is passed to the heat templates to
indicate whether the cluster nodes validate the Certificate Authority
when making requests to the OpenStack APIs (Keystone, Magnum, Heat).
This configuration parameter can be set to False to disable CA
validation.

Co-Authored-By: Vijendar Komalla <vijendar.komalla@rackspace.com>

Change-Id: Iab02cb1338b811dac0c147378dbd0e63c83f0413
Partial-Bug: #1663757
2017-11-21 10:25:32 -08:00
ArchiFleKs b5531ddb21 Add /etc/environment to flannel/etcd/kubelet
Everything is containerized in rkt. If behind proxy, flannel, etcd
and kubelet will failed to rkt fetch images and cluster creation
will failed.

Closes-Bug: #1689618
Change-Id: Ia12deeb659483980d2a20e4cba5d449167b600d0
2017-10-14 09:22:10 +05:30
Kevin Lefevre ee1ac9a8e0 [k8s_coreos] update kubelet args
Update Kubelet deprecated variables and hostname

Change-Id: I9a8429fbd6cd18dcb0d0613474dce749149c63db
2017-05-24 09:14:21 +02:00
Kevin Lefevre 1260590b4e [k8s_coreos] enable CoreDNS addon
Enable option to specify a custom cluster domain name.
Enable Kubelet integration with DNS.

Change-Id: I76f837c950ab9111d5a43fa522829d5034cd5ee8
2017-05-24 09:14:06 +02:00
Kevin Lefevre c14f7d7c56 [k8s_coreos] update to etcdv3 and kube 1.6
Change-Id: I6314ca1483c85bfe8b4577449d4c2ed553be87d9
2017-05-18 16:15:33 +02:00
Jenkins 68f0a6c6d2 Merge "[k8s_coreos] Avoid regenerating certs on reboot" 2017-05-14 21:12:25 +00:00
Jenkins 0dee921e6e Merge "Enable custom keystone endpoint_type in templates" 2017-05-10 16:40:04 +00:00
ArchiFleKs 2b8e9859cd [k8s_coreos] Avoid regenerating certs on reboot
Change-Id: I2f37891e24abcf2c7f9022722663171aa9277fcc
Closes-Bug: #1687903
2017-05-03 19:16:22 +02:00
Kevin Lefevre 4c241a683f Enable custom keystone endpoint_type in templates
Allow to specify a custom AUTH_URL for the templates in case instances
cannot reach internalURL which is the case in mose deployment.

A new variable in trust section: trustee_keystone_interface which
default to public is introduced.

Change-Id: I2a908c0752387e4ff4ad2b0fdf0c1025a73ce806
Closes-Bug: #1643197
2017-05-01 18:15:58 +02:00
yatin 033c9a5775 [k8s_coreos] Add kubernetes dashboard
kubernetes dashboard [1] has lot of features and is actively
managed.
With this patch kubernetes dashboard is added and enabled in
k8s coreos cluster by default.

The kubernetes dashboard is enabled by default. To disable it, set the
label 'kube_dashboard_enabled' to False

Reference:
[1] https://github.com/kubernetes/dashboard

Implements: blueprint add-kube-dashboard
Change-Id: I9b001ec3c232aea2395df7d83c6ac991cbf5dea3
2017-05-01 14:16:53 +00:00
ArchiFleKs ecfe6ac183 Fix CoreOS multi master with LB cluster creation
Cluster that uses ETCD like swarm and K8s failed with LB and TLS enable
because ETCD LB protocol is HTTP but SSL termination in on the ETCD
node. ETCD LB protocol should be the same as K8s with TLS enable

Partial-Bug: #1679724

Change-Id: Ie8c8a7e4609c0e2e63095d4c18af84cc653654e1
2017-04-11 11:10:58 +02:00
ArchiFleKs ff18982505 Fix CoreOS cluster creation and heat notify
Also fix the label issue introduced with
https://review.openstack.org/#/c/426291/

Closes-Bug: #1679663

Change-Id: Ic1ca4ebef96a796f22acb06722f209477b7db934
2017-04-11 11:09:27 +02:00
ArchiFleKs a18724b612 Add CoreOS/K8s recommended defaults to kube-proxy
The cluster-cidr fix asymetric routing in specific
use case. Adding dbus removes iptables error message for kube-proxy and
adding ${HOST_CERT_PATH} is just common practice.

Change-Id: I8912091ebcb5c1ef940f43e5195a849f8fa6370e
Partially-Implements: bp coreos-best-pratice
2017-03-20 09:31:48 +00:00
Jenkins c0c5af6a6a Merge "Prepare Kubelet for multiple container runtime" 2017-03-07 16:10:35 +00:00
ArchiFleKs ac1184fa47 Add admission control to CoreOS Driver
This adds the default set of admission control to CoreOS driver and
enable service account that are a requirement for most K8s addons

Change-Id: Id4948973627f4517eba13901e822f22e3fb1212f
Partially-Implements: bp coreos-best-pratice
2017-03-01 11:48:42 +01:00
ArchiFleKs c270539b16 Prepare Kubelet for multiple container runtime
This change introduces default recommended values for Kubelet on CoreOS:
- Usage of CNI (Container Networking Interface) with Flannel
- Update deprecated Kubelet Args (--config)
- Bind mount recommended CoreOS folders in Kubelet

It also introduces a new parameter: CONTAINER_RUNTIME which will allow to
switch between rkt and docker as container runtime. For now only docker
is used.

Partially-Implements: blueprint coreos-best-pratice
Change-Id: I1db1c3c06198b41098472f5c28405c533b91b41e
2017-02-26 18:20:47 +01:00
Jenkins ed173776ca Merge "Fix CVE-2016-7404" 2017-02-22 20:58:44 +00:00
Jenkins ca2982e83b Merge "Add Kubernetes API Service IP to x509 certificates" 2017-02-21 15:54:54 +00:00
ArchiFleKs 288bb34fe3 Add Kubernetes API Service IP to x509 certificates
By default, API service with service account is accessible from inside
the cluster at the address 10.254.0.1. This IP should be added to SANS
when generating the certs.

Fixes-bug: #1660811
Change-Id: I214b4296bea55bb0c4015165c56fbd8ca3cebd39
2017-02-20 16:36:21 +01:00
ArchiFleKs 7117ff28ca Make INSECURE_REGISTRY_URL works for CoreOS
Parent commit allow custom secure HYPERKUBE_IMAGE_REPO (which can also
be a local registry). Here we implement INSECURE_REGISTRY_URL which
allow settings custom insecure registry for Kubernetes infra components.

It also enable the insecure registry for Docker daemon.

Partially-Implements: blueprint coreos-best-pratice
Partially-Implements: blueprint support-insecure-registry
Change-Id: If00afa2e8a9100546301f9a1f161daed6e3ffc4f
2017-02-16 12:17:42 +01:00
Kevin Lefevre 8b3ebbe8bf Use variables for hyperkube and kube version
Introduce HYPERKUBE_IMAGE_REPO variable which is set to CoreOS
hyperkube by default. Also remove "_coreos.0" from script as it can be a
different build number. This number should be included in the kubernetes
version parameters and not in scripts.

With this, it is possible to use any combination of hyperkube image with
any tags. by default we use the CoreOS one.

Partially-Implements: blueprint support-insecure-registry
Partially-Implements: blueprint coreos-best-pratice
Change-Id: Ie0fbed4b160fa972cfe130c252e87765690e2f5f
2017-02-14 01:48:46 +01:00
Jenkins faed9a18ed Merge "Remove $myip when unnecessary and use KUBE_NODE_IP" 2017-02-11 19:11:33 +00:00
Kevin Lefevre 44f364b2ef Remove $myip when unnecessary and use KUBE_NODE_IP
myip is defined almost in every fragment. It is unnecessary. We can use
KUBE_NODE_IP that is defined in HEAT. Also, if for some reason
KUBE_NODE_IP is empty, we use the failsafe like in make-cert fragment
where we curl metadata to make sure KUBE_NODE_IP is not empty.

Implements: blueprint coreos-best-pratice
Change-Id: I8597a5afa9b4bc7a5c740738303102e7b60ec63e
2017-02-10 14:35:27 +01:00
ArchiFleKs 6aae3235de Make KUBE_ALLOW_PRIV used for api server
Change-Id: I7513a992cebce46d46308b8263d61efc56d17096
Implements: blueprint coreos-best-pratice
2017-02-10 11:59:00 +01:00
Jenkins 40df2f1886 Merge "Remove heat-params sourcing" 2017-02-10 09:29:57 +00:00
Jenkins 1c5569f735 Merge "Improve consistency for SSL PATH accross template" 2017-02-10 00:20:33 +00:00
Johannes Grassler e93d82e8b3 Fix CVE-2016-7404
This commit addresses multiple potential vulnerabilities in
Magnum. It makes the following changes:

* Permissions for /etc/sysconfig/heat-params inside Magnum
  created instances are tightened to 0600 (used to be 0755).
* Certificate retrieval is modified to work without the need
  for a Keystone trust.
* The cluster's Keystone trust id is only passed into
  instances for clusters where that is actually needed. This
  prevents the trustee user from consuming the trust in cases
  where it is not needed.
* The configuration setting trust/cluster_user_trust (False by
  default) is introduced. It needs to be explicitely enabled
  by the cloud operator to allow clusters that need the
  trust_id to be passed into instances to work. Without this
  setting, attempts to create such clusters will fail.

Please note, that none of these changes apply to existing
clusters. They will have to be deleted and rebuilt to benefit
from these changes.

Change-Id: I643d408cde0d6e30812cf6429fb7118184793400
2017-02-09 16:44:27 +01:00
ArchiFleKs bd2f578a69 Remove heat-params sourcing
Since commit 220675d42a heat-params are
used by systemd and are unnecessary.

Implements: blueprint coreos-best-pratice
Change-Id: Iaf88219db2d3aaa452ff07a146acb3fbef323eb1
2017-02-09 13:48:21 +01:00
Kevin Lefevre fb0aa7d3e1 Improve consistency for SSL PATH accross template
Multiple variables names where used in different fragments. This commit
makes KUBE_CERTS_PATH and HOST_CERTS_PATH hardcoded values in heat-params
fragment and use them inside fragments instead of hardcoded value and
different variables names

Implements: blueprint coreos-best-pratice
Change-Id: I8c7856601096672890ab5a1318db0177d582e53d
2017-02-09 13:33:28 +01:00
ArchiFleKs e154970558 Remove carriage return when getting user token
make-cert failed because keystone return a '\r' at the end of token

Change-Id: I2f65756e53bf7d5b3ac407c7b2a6c5bcba02454f
2017-02-07 17:17:42 +01:00
Jenkins c9afb83687 Merge "Fix missing $ in CoreOS proxy conf" 2017-02-06 09:37:47 +00:00
Kevin Lefevre 6096da5c85 Fix missing $ in CoreOS proxy conf
Change-Id: I0c57cd32ad56f9a485b1e76555dbbba4fea5148e
2017-02-01 09:20:40 +01:00
Kevin Lefevre 220675d42a Use heat-params in systemd unit
Instead of sourcing heat-params in script, we can use it as a systemd
unit EnvironmentFile directive and not inline in sh scripts.

Change-Id: I3ebf23dee6785febdc87bc5ce4212c30ef24806e
2017-02-01 09:18:19 +01:00
Jenkins 0407197f41 Merge "Pass OpenStack-API-Version header in make-cert scripts" 2017-01-26 21:59:12 +00:00
Jason Dunsmore fbfdbec60d Pass OpenStack-API-Version header in make-cert scripts
Otherwise, the magnum certificates API will return a 406 Not
Acceptable error.

Change-Id: I0d59bf71b62bdd4204cd32d26ef3f2fc30f8f180
Closes-Bug: #1659423
2017-01-26 20:27:22 +00:00
Bertrand NOEL 2a4ad9aa41 Make Kubernetes pods' health checks configurable
Make Kubernetes' kube-controller-manager and kube-scheduler
health checks configurable as a parameter to the cluster-template
(label).
Set their value higher for all deployments. And set their value
to a high number for tests, for the CI.

Change-Id: I65e2da12487c513419125f0525a4e21bac22210e
Closes-Bug: 1648826
2017-01-26 20:02:52 +00:00
ArchiFleKs ac68cfc086 Update MY_IP to use curl and metadata instead of cut
Change-Id: I1b7149c330c797c0909d4be6b04e9ab52e875ea4
2017-01-24 16:35:04 +01:00
yatin 03e7aee236 [k8s_coreos] Enable TLS in Etcd cluster
With this patch following are done:-
- Configure Etcd with TLS support

Configure Following to commuicate with TLS enabled Etcd:-
- Flannel

Etcd also listens at http://127.0.0.1:2379, so on master nodes
etcdctl can communicate without using certificates.

if TLS_DISABLED="True" then TLS is not enabled for etcd.

Change-Id: I7691ca328c4e1bc0738937b62cd813b5ad7df959
Implements: blueprint secure-etcd-cluster-coe
2016-12-26 14:00:37 +05:30
yatin 3c0e06e7a0 [k8s_coreos] Remove podmaster
Podmaster is deprecated since k8s 1.2 and its docker
image is v1, incompatible with docker >=1.12.

* Remove podmaster pod
* Update manifests of kube-controller-manager and kube-scheduler

Change-Id: Ib46182b811aba6a6e544de265bc89a7bcb7488e1
Closes-Bug: #1646109
2016-12-26 03:00:04 +00:00
ArchiFleKs 8d7bc9c99e Make Docker proxy configuration consistent across template
Closes-Bug: #1647815
Related-Bug: #1632698
Change-Id: Ic5e5cadd3d912f01072eff427a1095309c4f6e9b
2016-12-20 10:08:42 +01:00
Jenkins ea62e16166 Merge "Remove duplicate AUTH_URL parameter" 2016-11-10 11:54:19 +00:00