2016-09-26 00:57:07 +03:00
|
|
|
# Copyright (c) 2016 Mirantis, Inc.
|
|
|
|
# All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
# not use this file except in compliance with the License. You may obtain
|
|
|
|
# a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
|
2020-05-26 13:03:07 +00:00
|
|
|
KURYR_FQDN = 'kuryr.openstack.org'
|
|
|
|
|
2016-09-26 00:57:07 +03:00
|
|
|
K8S_API_BASE = '/api/v1'
|
2022-01-27 18:06:08 +01:00
|
|
|
K8S_API_PODS = K8S_API_BASE + '/pods'
|
2016-09-26 00:57:07 +03:00
|
|
|
K8S_API_NAMESPACES = K8S_API_BASE + '/namespaces'
|
2020-05-26 13:03:07 +00:00
|
|
|
K8S_API_CRD_VERSION = 'openstack.org/v1'
|
|
|
|
K8S_API_CRD = '/apis/' + K8S_API_CRD_VERSION
|
2018-07-11 07:21:37 -04:00
|
|
|
K8S_API_CRD_NAMESPACES = K8S_API_CRD + '/namespaces'
|
2020-02-10 08:46:03 +01:00
|
|
|
K8S_API_CRD_KURYRNETWORKS = K8S_API_CRD + '/kuryrnetworks'
|
2018-11-13 13:19:59 +03:00
|
|
|
K8S_API_CRD_KURYRNETPOLICIES = K8S_API_CRD + '/kuryrnetpolicies'
|
2020-03-11 11:27:09 +01:00
|
|
|
K8S_API_CRD_KURYRNETWORKPOLICIES = K8S_API_CRD + '/kuryrnetworkpolicies'
|
2019-09-25 14:10:17 +00:00
|
|
|
K8S_API_CRD_KURYRLOADBALANCERS = K8S_API_CRD + '/kuryrloadbalancers'
|
2020-05-26 13:03:07 +00:00
|
|
|
K8S_API_CRD_KURYRPORTS = K8S_API_CRD + '/kuryrports'
|
2018-06-08 08:28:34 +00:00
|
|
|
K8S_API_POLICIES = '/apis/networking.k8s.io/v1/networkpolicies'
|
2020-03-11 11:27:09 +01:00
|
|
|
K8S_API_NETWORKING = '/apis/networking.k8s.io/v1'
|
2021-04-12 14:33:15 +02:00
|
|
|
K8S_API_NETWORKING_NAMESPACES = K8S_API_NETWORKING + '/namespaces'
|
2016-10-13 22:28:27 +03:00
|
|
|
|
2018-06-25 21:24:19 +08:00
|
|
|
K8S_API_NPWG_CRD = '/apis/k8s.cni.cncf.io/v1'
|
|
|
|
|
2016-10-13 22:28:27 +03:00
|
|
|
K8S_OBJ_NAMESPACE = 'Namespace'
|
|
|
|
K8S_OBJ_POD = 'Pod'
|
|
|
|
K8S_OBJ_SERVICE = 'Service'
|
|
|
|
K8S_OBJ_ENDPOINTS = 'Endpoints'
|
2018-06-08 08:28:34 +00:00
|
|
|
K8S_OBJ_POLICY = 'NetworkPolicy'
|
2018-04-18 11:03:27 +00:00
|
|
|
K8S_OBJ_KURYRNET = 'KuryrNet'
|
2020-02-10 08:46:03 +01:00
|
|
|
K8S_OBJ_KURYRNETWORK = 'KuryrNetwork'
|
2018-07-11 07:21:37 -04:00
|
|
|
K8S_OBJ_KURYRNETPOLICY = 'KuryrNetPolicy'
|
2020-03-11 11:27:09 +01:00
|
|
|
K8S_OBJ_KURYRNETWORKPOLICY = 'KuryrNetworkPolicy'
|
2019-09-25 14:10:17 +00:00
|
|
|
K8S_OBJ_KURYRLOADBALANCER = 'KuryrLoadBalancer'
|
2020-05-26 13:03:07 +00:00
|
|
|
K8S_OBJ_KURYRPORT = 'KuryrPort'
|
2018-04-18 11:03:27 +00:00
|
|
|
|
2020-12-23 17:42:01 +01:00
|
|
|
OPENSHIFT_OBJ_MACHINE = 'Machine'
|
|
|
|
OPENSHIFT_API_CRD_MACHINES = '/apis/machine.openshift.io/v1beta1/machines'
|
|
|
|
|
2016-11-09 17:15:49 +03:00
|
|
|
K8S_POD_STATUS_PENDING = 'Pending'
|
2020-03-19 13:35:17 +09:00
|
|
|
K8S_POD_STATUS_SUCCEEDED = 'Succeeded'
|
|
|
|
K8S_POD_STATUS_FAILED = 'Failed'
|
2016-11-09 17:15:49 +03:00
|
|
|
|
|
|
|
K8S_ANNOTATION_PREFIX = 'openstack.org/kuryr'
|
|
|
|
K8S_ANNOTATION_VIF = K8S_ANNOTATION_PREFIX + '-vif'
|
2018-11-16 14:08:47 +01:00
|
|
|
K8S_ANNOTATION_LABEL = K8S_ANNOTATION_PREFIX + '-pod-label'
|
2020-03-11 11:27:09 +01:00
|
|
|
K8S_ANNOTATION_IP = K8S_ANNOTATION_PREFIX + '-pod-ip'
|
2018-12-30 22:10:51 +00:00
|
|
|
K8S_ANNOTATION_NAMESPACE_LABEL = K8S_ANNOTATION_PREFIX + '-namespace-label'
|
2017-01-31 23:19:32 +03:00
|
|
|
K8S_ANNOTATION_LBAAS_SPEC = K8S_ANNOTATION_PREFIX + '-lbaas-spec'
|
2017-03-28 18:43:26 +03:00
|
|
|
K8S_ANNOTATION_LBAAS_STATE = K8S_ANNOTATION_PREFIX + '-lbaas-state'
|
2018-04-18 11:03:27 +00:00
|
|
|
K8S_ANNOTATION_NET_CRD = K8S_ANNOTATION_PREFIX + '-net-crd'
|
2018-07-11 07:21:37 -04:00
|
|
|
K8S_ANNOTATION_NETPOLICY_CRD = K8S_ANNOTATION_PREFIX + '-netpolicy-crd'
|
2020-03-11 11:27:09 +01:00
|
|
|
K8S_ANNOTATION_POLICY = K8S_ANNOTATION_PREFIX + '-counter'
|
2016-11-29 09:34:37 +03:00
|
|
|
|
2021-02-24 14:31:07 +00:00
|
|
|
K8S_ANNOTATION_CLIENT_TIMEOUT = K8S_ANNOTATION_PREFIX + '-timeout-client-data'
|
|
|
|
K8S_ANNOTATION_MEMBER_TIMEOUT = K8S_ANNOTATION_PREFIX + '-timeout-member-data'
|
|
|
|
|
2018-06-25 21:24:19 +08:00
|
|
|
K8S_ANNOTATION_NPWG_PREFIX = 'k8s.v1.cni.cncf.io'
|
|
|
|
K8S_ANNOTATION_NPWG_NETWORK = K8S_ANNOTATION_NPWG_PREFIX + '/networks'
|
|
|
|
K8S_ANNOTATION_NPWG_CRD_SUBNET_ID = 'subnetId'
|
|
|
|
K8S_ANNOTATION_NPWG_CRD_DRIVER_TYPE = 'driverType'
|
|
|
|
|
2019-03-11 15:15:26 +03:00
|
|
|
K8S_ANNOTATION_NODE_PCI_DEVICE_INFO = 'openstack.org/kuryr-pci-info'
|
2019-04-29 17:29:25 +03:00
|
|
|
K8S_ANNOTATION_PCI_DEVICES = K8S_ANNOTATION_PREFIX + '-pci-devices'
|
2019-04-04 16:58:40 +03:00
|
|
|
K8S_ANNOTATION_OLD_DRIVER = 'old_driver'
|
|
|
|
K8S_ANNOTATION_CURRENT_DRIVER = 'current_driver'
|
|
|
|
K8S_ANNOTATION_NEUTRON_PORT = 'neutron_id'
|
2019-03-11 15:15:26 +03:00
|
|
|
|
2020-09-21 11:33:31 +00:00
|
|
|
K8S_ANNOTATION_HEADLESS_SERVICE = 'service.kubernetes.io/headless'
|
2022-01-19 18:16:37 +01:00
|
|
|
K8S_ANNOTATION_CONFIG_SOURCE = 'kubernetes.io/config.source'
|
2020-09-21 11:33:31 +00:00
|
|
|
|
2020-05-26 13:03:07 +00:00
|
|
|
POD_FINALIZER = KURYR_FQDN + '/pod-finalizer'
|
2020-02-10 08:46:03 +01:00
|
|
|
KURYRNETWORK_FINALIZER = 'kuryrnetwork.finalizers.kuryr.openstack.org'
|
2020-02-24 20:46:54 +00:00
|
|
|
KURYRLB_FINALIZER = 'kuryr.openstack.org/kuryrloadbalancer-finalizers'
|
|
|
|
SERVICE_FINALIZER = 'kuryr.openstack.org/service-finalizer'
|
2020-03-11 11:27:09 +01:00
|
|
|
NETWORKPOLICY_FINALIZER = 'kuryr.openstack.org/networkpolicy-finalizer'
|
2020-02-10 08:46:03 +01:00
|
|
|
|
2020-05-26 13:03:07 +00:00
|
|
|
KURYRPORT_FINALIZER = KURYR_FQDN + '/kuryrport-finalizer'
|
|
|
|
KURYRPORT_LABEL = KURYR_FQDN + '/nodeName'
|
|
|
|
|
2016-12-14 12:58:58 +05:30
|
|
|
K8S_OS_VIF_NOOP_PLUGIN = "noop"
|
|
|
|
|
2016-11-29 09:34:37 +03:00
|
|
|
CNI_EXCEPTION_CODE = 100
|
|
|
|
CNI_TIMEOUT_CODE = 200
|
2022-01-27 18:06:08 +01:00
|
|
|
CNI_DELETED_POD_SENTINEL = None
|
2017-09-18 11:22:22 +00:00
|
|
|
|
|
|
|
KURYR_PORT_NAME = 'kuryr-pool-port'
|
2019-03-12 11:28:02 +03:00
|
|
|
KURYR_VIF_TYPE_SRIOV = 'sriov'
|
2017-08-30 10:07:11 +00:00
|
|
|
|
|
|
|
OCTAVIA_L2_MEMBER_MODE = "L2"
|
|
|
|
OCTAVIA_L3_MEMBER_MODE = "L3"
|
2018-02-16 16:09:56 +01:00
|
|
|
NEUTRON_LBAAS_HAPROXY_PROVIDER = 'haproxy'
|
2020-02-27 17:03:55 +00:00
|
|
|
IPv4 = 'IPv4'
|
|
|
|
IPv6 = 'IPv6'
|
|
|
|
IP_VERSION_4 = 4
|
|
|
|
IP_VERSION_6 = 6
|
2017-08-29 08:43:34 +02:00
|
|
|
|
|
|
|
VIF_POOL_POPULATE = '/populatePool'
|
|
|
|
VIF_POOL_FREE = '/freePool'
|
2017-09-15 13:36:18 +00:00
|
|
|
VIF_POOL_LIST = '/listPools'
|
|
|
|
VIF_POOL_SHOW = '/showPool'
|
2017-06-05 18:10:03 +03:00
|
|
|
|
|
|
|
DEFAULT_IFNAME = 'eth0'
|
2018-06-15 14:11:34 +08:00
|
|
|
|
2019-01-30 12:52:57 +03:00
|
|
|
K8S_SRIOV_PREFIX = 'intel.com'
|
2018-12-08 16:35:35 +00:00
|
|
|
|
|
|
|
K8S_OPERATOR_IN = 'in'
|
|
|
|
K8S_OPERATOR_NOT_IN = 'notin'
|
|
|
|
K8S_OPERATOR_DOES_NOT_EXIST = 'doesnotexist'
|
|
|
|
K8S_OPERATOR_EXISTS = 'exists'
|
2019-04-04 16:58:40 +03:00
|
|
|
|
|
|
|
USERSPACE_DRIVERS = ['vfio-pci', 'uio', 'uio_pci_generic', 'igb_uio']
|
2019-12-17 11:08:53 +03:00
|
|
|
MELLANOX_DRIVERS = ['mlx4_core', 'mlx5_core']
|