Kubernetes integration with OpenStack networking
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

constants.py 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Copyright (c) 2016 Mirantis, Inc.
  2. # All Rights Reserved.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License"); you may
  5. # not use this file except in compliance with the License. You may obtain
  6. # a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. # License for the specific language governing permissions and limitations
  14. # under the License.
  15. K8S_API_BASE = '/api/v1'
  16. K8S_API_NAMESPACES = K8S_API_BASE + '/namespaces'
  17. K8S_API_CRD = '/apis/openstack.org/v1'
  18. K8S_API_CRD_NAMESPACES = K8S_API_CRD + '/namespaces'
  19. K8S_API_CRD_KURYRNETS = K8S_API_CRD + '/kuryrnets'
  20. K8S_API_CRD_KURYRNETPOLICIES = K8S_API_CRD + '/kuryrnetpolicies'
  21. K8S_API_POLICIES = '/apis/networking.k8s.io/v1/networkpolicies'
  22. K8S_API_NPWG_CRD = '/apis/k8s.cni.cncf.io/v1'
  23. K8S_OBJ_NAMESPACE = 'Namespace'
  24. K8S_OBJ_POD = 'Pod'
  25. K8S_OBJ_SERVICE = 'Service'
  26. K8S_OBJ_ENDPOINTS = 'Endpoints'
  27. K8S_OBJ_POLICY = 'NetworkPolicy'
  28. K8S_OBJ_KURYRNET = 'KuryrNet'
  29. K8S_OBJ_KURYRNETPOLICY = 'KuryrNetPolicy'
  30. K8S_POD_STATUS_PENDING = 'Pending'
  31. K8S_ANNOTATION_PREFIX = 'openstack.org/kuryr'
  32. K8S_ANNOTATION_VIF = K8S_ANNOTATION_PREFIX + '-vif'
  33. K8S_ANNOTATION_LABEL = K8S_ANNOTATION_PREFIX + '-pod-label'
  34. K8S_ANNOTATION_LBAAS_SPEC = K8S_ANNOTATION_PREFIX + '-lbaas-spec'
  35. K8S_ANNOTATION_LBAAS_STATE = K8S_ANNOTATION_PREFIX + '-lbaas-state'
  36. K8S_ANNOTATION_NET_CRD = K8S_ANNOTATION_PREFIX + '-net-crd'
  37. K8S_ANNOTATION_NETPOLICY_CRD = K8S_ANNOTATION_PREFIX + '-netpolicy-crd'
  38. K8S_ANNOTATION_LBAAS_RT_STATE = K8S_ANNOTATION_PREFIX + '-lbaas-route-state'
  39. K8S_ANNOTATION_LBAAS_RT_NOTIF = K8S_ANNOTATION_PREFIX + '-lbaas-route-notif'
  40. K8S_ANNOTATION_ROUTE_STATE = K8S_ANNOTATION_PREFIX + '-route-state'
  41. K8S_ANNOTATION_ROUTE_SPEC = K8S_ANNOTATION_PREFIX + '-route-spec'
  42. K8S_ANNOTATION_NPWG_PREFIX = 'k8s.v1.cni.cncf.io'
  43. K8S_ANNOTATION_NPWG_NETWORK = K8S_ANNOTATION_NPWG_PREFIX + '/networks'
  44. K8S_ANNOTATION_NPWG_CRD_SUBNET_ID = 'subnetId'
  45. K8S_ANNOTATION_NPWG_CRD_DRIVER_TYPE = 'driverType'
  46. K8S_OS_VIF_NOOP_PLUGIN = "noop"
  47. CNI_EXCEPTION_CODE = 100
  48. CNI_TIMEOUT_CODE = 200
  49. KURYR_PORT_NAME = 'kuryr-pool-port'
  50. KURYR_L7_ROUTER_HTTP_PORT = '80'
  51. OCTAVIA_L2_MEMBER_MODE = "L2"
  52. OCTAVIA_L3_MEMBER_MODE = "L3"
  53. NEUTRON_LBAAS_HAPROXY_PROVIDER = 'haproxy'
  54. VIF_POOL_POPULATE = '/populatePool'
  55. VIF_POOL_FREE = '/freePool'
  56. VIF_POOL_LIST = '/listPools'
  57. VIF_POOL_SHOW = '/showPool'
  58. DEFAULT_IFNAME = 'eth0'
  59. ADDITIONAL_IFNAME_PREFIX = 'eth'
  60. K8S_NPWG_SRIOV_PREFIX = "intel.com/sriov"
  61. K8S_OPERATOR_IN = 'in'
  62. K8S_OPERATOR_NOT_IN = 'notin'
  63. K8S_OPERATOR_DOES_NOT_EXIST = 'doesnotexist'
  64. K8S_OPERATOR_EXISTS = 'exists'