Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CKO: Changes added to handle cko-calico flavor configuration #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abhis2112
Copy link
Contributor

  1. Added a new task file which run cko calico side changes via acc-provision
  2. Added the new net-operator-controller deployment alongwith the CRD and CR in templates folder.
  3. Dockerfile acc-provision branch changes

@abhis2112
Copy link
Contributor Author

It's a First Draft. Kindly review with all possible comments

roles/accprovision/templates/net-operator-deployment.yaml Outdated Show resolved Hide resolved
roles/accprovision/templates/net-operator-deployment.yaml Outdated Show resolved Hide resolved
image_prefix: quay.io/noirolabs
image_pull_secret: noiro-docker-registry-secret
openvswitch_version: kmr2-test
opflex_agent_version: kmr2-test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop this section

roles/accprovision/templates/net-operator-deployment.yaml Outdated Show resolved Hide resolved
roles/accprovision/templates/net-operator-deployment.yaml Outdated Show resolved Hide resolved
roles/accprovision/templates/net-operator-deployment.yaml Outdated Show resolved Hide resolved
roles/accprovision/templates/net-operator-deployment.yaml Outdated Show resolved Hide resolved
- name: Collecting config-map spec
set_fact:
cmap_input: "{{ cmap_data['resources'][0]['data']['spec'] }}"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L8 to L28 are not relevant (there is no config-map that is going to be used)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the config-map holds the original structure of acc_provision_input yaml, which will be used to create a new input yaml from the CR if we update any value in the CR. The values in CR will be deep merged with its original content. Although, we can discuss it if we are going to have just calico config and nothing else as per related to acc_provision_input.yaml

roles/accprovision/tasks/net-operator-controller.yml Outdated Show resolved Hide resolved
@abhis2112 abhis2112 force-pushed the abhi-cko-calico branch 5 times, most recently from b25e637 to 58c3012 Compare November 23, 2021 21:11
apiVersion: v1
kind: Namespace
metadata:
name: aci-containers-system
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is okay for now, but over time we should change this to be network-operator-controller

- '*'
verbs:
- '*'
- apiGroups:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all the aci-cni specific details should be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • apiGroups:
    • aci.ctrl
      resources:
    • accprovisioninputs
    • accprovisioninputs/status
    • accprovisioninputs/finalizers

these are only the ones that are there as we have kept the name the same for the CR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the ones below, they are all aci-cni specific and unnecessary...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L55-61 and L85-122 should be removed.

\ \"node_svc_subnet\": \"15.5.168.1/21\",\n \"interface_mtu\"\
: 1400,\n \"pod_subnet_chunk_size\": 24,\n \"node_subnet\"\
: \"15.11.0.1/27\",\n \"pod_subnet\": \"15.128.0.1/16\"\n }\n\
\ }\n }"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this spec string should be different, in fact it should ideally be empty to begin with...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked. Currently needed the pod_subnet and rest other fields in net_config. Otherwise, it says missing option. We need to support the downstream acc-provision to remove the rest of the irrelevant fields.

Copy link

@tanyatukade tanyatukade Dec 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HI @abhis2112, I have removed the "node_svc_subnet", "pod_subnet_chunk_size" and "extern_static" fields from the required options in my acc-provision branch. When using "cko-calico" flavor, these fields are no longer required and can be safely removed.

@abhis2112 abhis2112 force-pushed the abhi-cko-calico branch 2 times, most recently from 07544b1 to 66846fb Compare December 1, 2021 07:10
- '*'
verbs:
- '*'
- apiGroups:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L55-61 and L85-122 should be removed.

\ \"extern_dynamic\"\
: \"151.9.1.1/24\",\n\
\ \"node_subnet\": \"15.11.0.2/27\",\n \"pod_subnet\": \"\
15.128.0.1/27\"\n }\n }\n }"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above spec should not have any fabric-specific hard-coded values.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting "dummy" as the value

encap_type: vxlan
mcast_range:
start: 225.20.1.1
end: 225.20.255.255
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L12-16 should be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing assuming backend acc-provision supports the removal

net_config: {}
nodepodif_config: {}
operator_managed_config:
enable_updates: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L35-36 should be removed

cnideploy_version: kmr2-test
opflex_agent_version: kmr2-test
openvswitch_version: kmr2-test
aci_containers_operator_version: kmr2-test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L39-44 should be removed

1. Added a new task file which run cko calico side changes via acc-provision
2. Created a new namespace net-operator-controller
3. Added the new net-operator-controller deployment in manifest folder alongwith the CRD, and CR in templates folder.
4. Updated CRD schema according to control cluster deployment
5. Dockerfile acc-provision branch changes
6. Provided sample CR with all dummy details
kind: ClusterRole
metadata:
labels:
network-plugin: calico
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This label is not relevant.

apiVersion: v1
kind: ServiceAccount
metadata:
name: net-operator-controller
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets keep the namespace name as "net-operator-controller" but change all other occurrences below to network-operator-fabric-controller.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the "controller" terminology is confusing. Let's use "manager" instead. Apologies for the repeated changes, so lets call this net-operator-manager.

verbs:
- '*'
- apiGroups:
- aci.ctrl
Copy link
Contributor

@snaiksat snaiksat Jan 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets call this something that reflects "network operator fabric manager"

status: {}
schema:
openAPIV3Schema:
description: accprovisioninput defines the input configuration for ACI CNI
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the description here and below to remove references to ACI CNI.

spec: "{}"
kind: ConfigMap
metadata:
name: acc-provision-config
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cluster-input-config

- apiGroups:
- aci.ctrl
resources:
- accprovisioninputs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's replace all occurrences of "accprovision" here and below with "clusterinput" or "ClusterInput" or "cluster-input" as relevant.

scheduler.alpha.kubernetes.io/critical-pod: ''
labels:
name: net-operator-controller
network-plugin: aci-containers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

- name: ACC_PROVISION_FLAVOR
value: cko-calico
- name: ACC_PROVISION_INPUT_CR_NAME
value: accprovisioninput
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this name and value to reflect "cluster input" naming convention

value: accprovisioninput
image: quay.io/noirolabs/acc-provision-operator:abhishek
imagePullPolicy: Always
name: acc-provision-operator
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

network-operator-fabric-controller



- name: Generate new deployment yaml
shell: "acc-provision -c {{ acc_provision_file_name }} -f {{ lookup('env', 'ACC_PROVISION_FLAVOR') }} -o {{ aci_cni_deployment_file }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we rename aci_cni_deployment_file to: network_operator_deployment_file

@@ -0,0 +1,94 @@
apiVersion: aci.ctrl/v1alpha1
kind: AccProvisionInput
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update as per earlier changes here and below

@@ -13,11 +13,11 @@ COPY docker/licenses /licenses
# Export http and https proxy here if building locally for dev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a new docker file for this, we keep the acc-provision-operator docker file as is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants