TykTechnologies / tyk-operator

Tyk Operator for Kubernetes
https://tyk.io
Other
198 stars 40 forks source link

CRUD a Tyk Organization decleratively #64

Closed asoorm closed 3 years ago

asoorm commented 4 years ago

When spinning up a new environment, or for disaster recovery, or replication of dev/staging/prod, it is desirable to bootstrap a Tyk organisation.

{
    "_id" : ObjectId("5d67b96d767e02015ea84a6f"),
    "owner_name" : "asoorm",
    "owner_slug" : "asoorm",
    "cname_enabled" : true,
    "cname" : "portal.ahmet:3000",
    "apis" : [],
    "sso_enabled" : false,
    "developer_quota" : 0,
    "developer_count" : 1,
    "event_options" : {
        "hashed_key_event" : {
            "webhook" : "",
            "email" : "",
            "redis" : true
        }
    },
    "hybrid_enabled" : true,
    "ui" : {
        "languages" : {},
        "hide_help" : false,
        "default_lang" : "",
        "login_page" : {},
        "nav" : {},
        "uptime" : {},
        "portal_section" : {},
        "designer" : {},
        "dont_show_admin_sockets" : false,
        "dont_allow_license_management" : false,
        "dont_allow_license_management_view" : false,
        "cloud" : false
    },
    "org_options_meta" : {}
}

As such, we need to map the Tyk Organization object to a k8s custom resource.

This object will be the foundation to scaffolding users & apis. e.g. we will first create an organization, then use this object to obtain the org_id, to create the operator user in that org.

This way, the operator will be able to control resources across multiple organizations in a multi-tenant setup.

The organization object will be used to Bootstrap Tyk Pro in a CI/CD environment as part of various CRD integration test suites.

asoorm commented 3 years ago

Closing this as the official helm charts can be used to bootstrap an org & supply configs for the Tyk Operator.