Skip to content

[RFC]: v1beta2 schema - OscCluster #809

Description

@jfbus

Problem to Solve

The v1beta1 schema is cluttered with redundant information and contains a lot of deprecated/unused attributes.

Here are some simplifications that could be applied:

  • Roles where introduced to manage references between resources. In v1beta1, names are both names (as displayed in Cockpit) and references. Names could be dropped (except in securityGroups, purely for documentation purposes). Name tags would be 100% auto-generated (e.g. <Resource type> for <cluster name>), and references would only be role-based.
  • NAT Services could be 100% autogenerated (1 NAT service per subnet having the nat role)
  • Disabling NAT Services could be a possibility (e.g. when a firewall/WAF appliance is used)
  • The network attribute could be dropped, and all subattributes moved up 1 level,
  • Replace disable with an object, to match useExisting,
  • To simplify SG rules, a more compact <protocol>[/<fromPort>:<toPort>] syntax could be used (eg tcp/8080:8088 = all tcp ports from 8080 to 8088, tcp = all tcp ports from 1 to 65535)

Some additional features are discussed as comments below...

Note: the v1beta1 schema is still being supported (as long as roles are properly set), and you will still be able to write/read v1beta1 schemas, even if the resources are stored and reconciled as v1beta2.

Proposed Solution

Here is a proposal for a new OscCluster schema:

credentials:
    fromFile: <string>
    fromSecret: <string>
    profile: <string>
allowFromIPRanges:
- <cidr>
allowToIPRanges:
- <cidr>
bastion:
  enable: <bool>
  vm: <see VM definition>
useExisting:
  net: <bool>
  securityGroups: <bool>
disable:
  internet: <bool>
  loadBalancer: <bool>
subregions:
- <string>
net:
  ipRange: <cidr>
  resourceId: <id> # The Id of the Net to reuse (if useExisting.net is set)
subnets:
  roles:
  - <role>
  subregion: <cidr>
  ipRange: <cidr>
  resourceId: <id> # The id of the Subnet to reuse (if useExisting.net is set)
natPublicIpPool: <string>
netAccessPoints:
- <service id>
netPeering:
  enable: <bool>
  managementAccountId: <id>
  managementCredentials:
    fromFile: <string>
    fromSecret: <string>
    profile: <string>
  managementNetId: <id>
  managementSubnetId: <id>
routeTables:
- role: <role>
  routes:
  - destination: <cidr>
    targetType: <gateway|nat-service>
    targetRole: <custom role>
    subregion: <string>
securityGroups:
- name: <name>
  authoritative: <bool>
  resourceId: <id> # When useExisting.securityGroup is set, the id of an existing securityGroup to use.
  roles:
  - <role>
  rules:
  - name: <string>
    flow: <string>
    ports:
    - <string>
    ipRanges:
    - <cidr>
additionalSecurityRules:
- roles:
  - <role>
  rules:
  - name: <string>
    flow: <string>
    ports:
    - <string>
    ipRanges:
    - <cidr>
loadBalancer:
  healthCheck:
    port: <int>
    protocol: <string>
    checkinterval: <int>
    timeout: <int>
    healthythreshold: <int>
    unhealthythreshold: <int>
  listener:
    backendport: <int>
    backendprotocol: <string>
    loadbalancerport: <int>
    loadbalancerprotocol: <string>
    loadbalancername: <string>
    loadbalancertype: <string>
reconciliationRules:
- appliesTo:
  - <string>
  mode: <onChange|always|random>
  reconciliationChance: <int>

Migration

  • CAPOSC v1.x had a dual role/name reference management. CAPOSC will require roles, and roles need to be added to existing resources

Environment Details

- Kubernetes version (`kubectl version`):
- OS (`/etc/os-release`):
- Kernel (`uname -a`):
- cluster-api-provider-outscale version:
- cluster-api version:
- Install tools:
- Kubernetes distribution:
- Kubernetes distribution version:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions