Skip to content

complex uperf net_policy with IP and ports#4

Open
mukrishn wants to merge 41 commits intoHughNhan:hnhan-uperf-scalefrom
mukrishn:net_policy
Open

complex uperf net_policy with IP and ports#4
mukrishn wants to merge 41 commits intoHughNhan:hnhan-uperf-scalefrom
mukrishn:net_policy

Conversation

@mukrishn
Copy link

@mukrishn mukrishn commented Mar 17, 2021

Need extra arguments,

spec:
  workload:
    args:
      ...
      networkpolicy: true
      ip_block:
        enable: true
        allow_subnet: "10.128.0.0/14"
        except_subnet:
          - "10.129.2.0/23"
          - "10.128.2.0/23"
      port_block:
        enable: true
      ...

will add below policy

...
...
    ingress:
    - from:
      - podSelector:
          matchLabels:
            type: uperf-benchmark-bench-client-3090cbf0
      - namespaceSelector:
          matchLabels:
            project: my-ripsaw
      - ipBlock:
          cidr: 10.128.0.0/14
          except:
          - 10.129.2.0/23
          - 10.128.2.0/23
          ...

HughNhan and others added 30 commits February 9, 2021 11:23
Model-S supports "node_range: [n, m]" and "density_range: [x, y]"
to specify enumeration by both dimension.
…rk context.

Fix last commit which introduced node_range and density_range but inadvertedly
still used min_node and max_node for condition check i.e "when: max_node is defined"
…a correlation.

While at it beefup a few place with "when: xxx is defined" for robustness
Valid step_size values are: addN or log2. N can be any decimal number.
enter main loop (due to start-True) then acquire pod_idx and node_idx.
They miss out the restart state, and run prematurely
This fits in with the idea that we are viewing worker nodes as just a pool
of resources and not by individual hostnames. This gives the flexibility for
users to isolate the tests to only one hardware model of workers as well (since
each model can be labelled with its model name).

Also there was a bug in previous code where only the first node in the list
was technically being excluded in `workload_args.excluded_node[0]`.

Signed-off-by: Sai Sindhur Malleni <smalleni@redhat.com>
  Increase redis-server to 2 CPU.
  Add sleep's to workload/uperf clients
Point operator resource spec to compatible image.
Signed-off-by: Sai Sindhur Malleni <smalleni@redhat.com>
***Important***
 pin=true/false
   "pin=true" will run Pin mode
   "pin=false" will run Scale mode
 In Pin mode, "pair=n" is now obsolete. Use denstiy_range[] instead

Scale mode The default values are:
   node_range=[1,1], density_range=1,1], step_size=add1 and colcate=false
Integrated "serviceip" into scale framework. Was not working until this commit.
Cosmetic cleanup i.e debug TASK tags, and doublle "when" guards.
  a. Keep 'pair' for pin mode
  b. Remove custom image URLs
2. Rebase to upstream
@mukrishn mukrishn force-pushed the net_policy branch 2 times, most recently from 2be8702 to 1932f6f Compare March 17, 2021 22:13
build/Dockerfile Outdated
FROM quay.io/operator-framework/ansible-operator:v0.17.1
USER root

RUN pip3 install netaddr
Copy link
Owner

Choose a reason for hiding this comment

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

Do we need this package?

Copy link
Author

Choose a reason for hiding this comment

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

Hugh, still we are not finalized with the policy so this PR is just a draft until we test & freeze it.
For now this package is not required.

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.

4 participants