2 ##############################################################################
3 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. #
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may #
6 # not use this file except in compliance with the License. #
8 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ##############################################################################
17 # This file defines a boot action for MaaS to deploy the calico-ip-rules script
18 # to nodes, register with systemd, and runs the script on all PXE booted nodes.
19 # On the genesis node, this is a manual step detailed in deployment documentation.
21 # NOTE: This is a copy from `aic-clcp-manifests/type/cruiser/v4.0/`, because
22 # this is an upstream manifest based on airship-treasuremap, which does not
23 # have bgp VIP configuration scripts.
24 schema: 'drydock/BootAction/v1'
26 schema: 'metadata/Document/v1'
28 storagePolicy: 'cleartext'
33 application: 'drydock'
36 schema: pegleg/CommonAddresses/v1
37 name: common-addresses
38 path: .calico.ip_rule.gateway
41 pattern: DH_SUB_GATEWAY_IP
43 schema: pegleg/CommonAddresses/v1
44 name: common-addresses
45 path: .kubernetes.pod_cidr
48 pattern: DH_SUB_POD_CIDR
50 schema: pegleg/CommonAddresses/v1
51 name: common-addresses
52 path: .calico.bgp.ipv4.public_service_cidr
55 pattern: DH_SUB_INGRESS_CIDR
56 # Substitution of the configure-ip-rules script into this bootaction
58 schema: pegleg/Script/v1
59 name: configure-ip-rules
66 - path: /etc/systemd/system/configure-ip-rules.service
71 Description=IP Rules Initialization Service
72 After=network-online.target local-fs.target
75 ExecStart=/opt/configure-ip-rules.sh -g DH_SUB_GATEWAY_IP -c DH_SUB_POD_CIDR -s DH_SUB_INGRESS_CIDR
77 WantedBy=multi-user.target
80 - path: /opt/configure-ip-rules.sh