Code Monkey home page Code Monkey logo

Comments (3)

ahmetb avatar ahmetb commented on July 2, 2024

Based on our discussion today: the easiest way to do this will be not use k8s.io/client-go and github.com/knative/serving/pkg/apis/serving/v1 package at all. With that, we need to have a KUBECONFIG file (or construct it in-memory) which complicates the configuration surface quite a bit.

If all we want to support is GKE, we can:

  • imitate gcloud run cli and accept --cluster-location and --cluster options
  • use those to get GKE cluster info (endpoint and server CA cert)
  • use those to construct an http client (using golang.org/x/oauth2 + /google)
  • make API calls to Knative API on the GKE cluster directly
  • the tool authenticates to the GKE master endpoint with IAM roles/container.admin role (or equivalent Kubernetes RBAC binding inside the cluster, doesn't really matter).

The only downsides I see are that:

  • potential data loss/corruption on ksvc object if knative serving APIs add something (even to fields like metadata:, and run/v1 package is not updated and picked up in this tool).
  • dealing with raw JSON and raw endpoints versus using nice client libraries (although, maybe we can actually make run/v1 work with the k8s endpoint by tweaking some options).

from cloud-run-release-manager.

gvso avatar gvso commented on July 2, 2024

Thinking of the configuration from the user perspective:

./cloud_run_release_manager -platform=gke  [-clusters=<MY_CLUSTER1>,<MY_CLUSTER2>] [-cluster-locations=us-central1-a,us-central1-b] [-namespaces=default] [-project=<PROJECT_ID>]

platform is by default managed. We could add support for managing services in CRFM and CRfA at the same time later

For the first implementation of this, we might want to make the optional arguments required. Maybe support a single cluster only

from cloud-run-release-manager.

ahmetb avatar ahmetb commented on July 2, 2024

For the first implementation of this, we might want to make the optional arguments required. Maybe support a single cluster only

I think that'll be the case forever, by design. The tool should manage (1) either FM or CRFA, not both simultaneously, (2) only one cluster at a time.

from cloud-run-release-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.