Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

WIP Initial api server #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

WIP Initial api server #1

wants to merge 7 commits into from

Conversation

alexeykazakov
Copy link
Member

@alexeykazakov alexeykazakov commented Mar 14, 2019

This is just an initial commit with Shane's POC (https://github.com/sbryzak/kubepoc) + makefile + minishift wiring + other infra changes + some cleanup.
I would like to merge it sooner rather than blowing it up by trying to make it perfect in the first shot.
Our next steps/PR would be:

  1. Proper logging
  2. Figure out how to use certificates properly (it's fine to use self-sign certs fro dev-env and tests though)
  3. RBAC
  4. Figure out how to write test for Aggregated API
  5. Move Matous's build detect PoC to this repo
  6. Move GitSource API from devopsconsole-operator repo here
  7. Find a better quay repo instead of openshiftio (to align with other devopsconsole services/operator)
  8. ...

subjects:
- kind: ServiceAccount
name: apiserver
namespace: codeready-devconsole
Copy link
Member

Choose a reason for hiding this comment

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

Let's use the openshift-devops-console namespace ( along the lines of openshift-web-console )

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@alexeykazakov alexeykazakov changed the title Initial app server Initial api server Mar 14, 2019
@alexeykazakov alexeykazakov marked this pull request as ready for review March 15, 2019 21:46
@@ -0,0 +1,38 @@
apiVersion: v1
kind: ReplicationController

Choose a reason for hiding this comment

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

How about Deployment? we'll get same functionality of RC, along with rollout/rollback using ReplicaSet?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah we can switch to Deployment. But maybe in a followup PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

kind: ServiceAccount
apiVersion: v1
metadata:
name: apiserver

Choose a reason for hiding this comment

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

name apiserver looks generic.

Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -0,0 +1,88 @@
DOCKER_REPO?=quay.io/openshiftio

Choose a reason for hiding this comment

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

I think we should get rid out of openshiftio

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but we do not have any better repo yet. Will switch to something more suitable later.

@@ -0,0 +1,38 @@
apiVersion: v1
kind: ReplicationController

Choose a reason for hiding this comment

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

How about Deployment? we'll get same functionality of RC, along with rollout/rollback using ReplicaSet?

Copy link
Member Author

Choose a reason for hiding this comment

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

# Replace this with the built image name
image: REPLACE_IMAGE
imagePullPolicy: Always
command: [ "/git-service", "--etcd-servers=http://localhost:2379" ]

Choose a reason for hiding this comment

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

just curious, did we verify that etcd servers have valid certificates to talk using localhost on openshift 4. Also we need to figure out how can we get HA node etcd clusters endpoints?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure we really care about that right now. We do not manipulate any resources (at least not yet). Will need to look at this later if needed.

containers:
- name: git-service
# Replace this with the built image name
image: quay.io/openshiftio/git-service:dev

Choose a reason for hiding this comment

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

can we change openshiftio?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. But not now :) See above.


func installCompositionGitWebService(gitServer *GitAPIServer) {
path := fmt.Sprintf("/apis/%s/%s/namespaces/{namespace}", GroupName, GroupVersion)
fmt.Println("WS PATH:" + path)

Choose a reason for hiding this comment

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

can we remove println?

Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -0,0 +1,19 @@
FROM quay.io/openshiftio/rhel-base-golang:latest

Choose a reason for hiding this comment

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

maybe we should start using multi-stage docker build https://docs.docker.com/develop/develop-images/multistage-build/

Copy link

@xcoulon xcoulon Mar 20, 2019

Choose a reason for hiding this comment

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

@dipak-pawar it was not supported in OpenShift 3 because the version of the supported Docker daemon was too old. I'm not sure about OpenShift 4, though. Maybe it could work with Buildah ?

Copy link

@sbryzak sbryzak left a comment

Choose a reason for hiding this comment

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

This looks like a reasonable starting point, and while many things will probably change I think we should get this merged so that we have a foundation on which to proceed.



[[constraint]]
branch = "master"
Copy link

Choose a reason for hiding this comment

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

We should probably lock these down later on, but I think it's fine to leave them as is for now.

@alexeykazakov alexeykazakov changed the title Initial api server WIP. Initial api server Apr 1, 2019
@alexeykazakov alexeykazakov changed the title WIP. Initial api server WIP Initial api server Apr 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants