admiraltyio / admiralty

A system of Kubernetes controllers that intelligently schedules workloads across clusters.
https://admiralty.io
Apache License 2.0
674 stars 87 forks source link

Fixes to enable Admiralty on OpenShift #134

Open hfwen0502 opened 2 years ago

hfwen0502 commented 2 years ago
hfwen0502 commented 2 years ago

For the suggestions to incorporate OpenShift in the quick start guide, I am not sure how we would easily incorporate that in. The quick start guide just focused on clusters created by kind.

I do not understand your comments about getting CA and config twice. Users can just include those commands to create a new kubeconfig secret based on the original one. They do not need to manually prepare a modified kubeconfig. The part to compare the original kubeconfig and the modified kubeconfig is just for the explanation purpose.

adrienjt commented 2 years ago

For the suggestions to incorporate OpenShift in the quick start guide...

You'd also provide RHOKS equivalents for kind create cluster and other kind-specific commands.

I do not understand your comments about getting CA and config twice...

As is, explanations read like instructions, which is confusing. For example:

hfwen0502 commented 2 years ago

Ok. Now I understand the comments about getting CA and config twice. Certainly can improve it.

There is no simple CLI command to create an OpenShift cluster on IBM Cloud. The best way I would recommend is to do it through the web console. That's why I included a doc link there regarding how to create OCP on IBM Cloud.

hfwen0502 commented 2 years ago

I don't know if it makes sense to use a long command like this:

ibmcloud oc cluster create vpc-gen2 -h
NAME:
        vpc-gen2 - Create a cluster with worker nodes on Virtual Private Cloud (VPC) Gen 2 infrastructure.

USAGE:
        ibmcloud ks cluster create vpc-gen2 --flavor FLAVOR --name NAME --subnet-id ID --vpc-id ID --zone ZONE [--disable-public-service-endpoint] [--entitlement ENTITLEMENT] [--pod-subnet SUBNET] [-q] [--service-subnet SUBNET] [--version VERSION] [--workers COUNT]

PARAMETERS:
    --name value                       Enter a name for the cluster.
    --zone value                       Specify the zone for the worker pool in a multizone cluster. To list available zones, run 'ibmcloud ks zone ls'.
    --vpc-id value                     The ID of the VPC in which to create the worker nodes. To list available IDs, run 'ibmcloud ks vpcs'.
    --subnet-id value                  The VPC subnet to assign the cluster. To list available subnets, run 'ibmcloud ks subnets --provider vpc-classic --vpc-id <vpc-id> --zone <vpc-zone>'.
    --flavor value                     The flavor of the worker node. To see available flavors, run 'ibmcloud ks flavors --zone <zone name>' (for public IBM Cloud accounts) or 'ibmcloud ks flavors' (for IBM Cloud Dedicated accounts).
    --entitlement value                Set this flag to 'cloud_pak' only if you use this cluster with a Cloud Pak that has an OpenShift entitlement.
    --service-subnet value             Specify a custom subnet CIDR to provide private IP addresses for services. The subnet must be at least '/24' or larger. For more info, see 'https://ibm.biz/service-subnet' Default value: '172.21.0.0/16'
    --pod-subnet value                 Specify a custom subnet CIDR to provide private IP addresses for pods. The subnet must be at least '/23' or larger. For more info, see 'https://ibm.biz/pod-subnet'
    --workers value                    The number of worker nodes per zone in the default worker pool. (default: 1)
    --disable-public-service-endpoint  Disable the public service endpoint to prevent public access to the master.
    --version value                    Specify the Kubernetes or OpenShift version, including at least the major.minor version. If you do not include this flag, the default version is used. To see available versions, run 'ibmcloud ks versions'.
    -q                                 Do not show the message of the day or update reminders.
adrienjt commented 2 years ago

ibmcloud oc cluster create vpc-gen2

Yes, something like that.

We're about to release Admiralty 0.15 and I'd like to make it compatible with OpenShift. Since the doc change might take a while, could you please create a separate PR for the chart RBAC change, so I can merge that already?

hfwen0502 commented 2 years ago

Sure. This is the new pull request: https://github.com/admiraltyio/admiralty/pull/144.