Skip to content

Commit

Permalink
Rename project name to knitnet-operator
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielXLee committed Jul 11, 2021
1 parent 4568bf2 commit fd2f4d9
Show file tree
Hide file tree
Showing 54 changed files with 262 additions and 264 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/arm,linux/ppc64le
file: ./Dockerfile
push: true
tags: quay.io/danielxlee/cluster-fabric-operator:latest
tags: quay.io/danielxlee/knitnet-operator:latest
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Image repo
IMG_REPO ?= quay.io/danielxlee
# Image URL to use all building/pushing image targets
IMG ?= ${IMG_REPO}/cluster-fabric-operator:latest
IMG ?= ${IMG_REPO}/knitnet-operator:latest
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false"

Expand Down Expand Up @@ -77,7 +77,7 @@ build: generate generate-embeddedyamls fmt vet ## Build manager binary.
run: manifests generate fmt vet ## Run a controller for deploy broker.
go run ./main.go

docker-build: test ## Build docker image with the manager.
docker-build: #test ## Build docker image with the manager.
docker build -t ${IMG} .

docker-push: ## Push docker image with the manager.
Expand Down
8 changes: 4 additions & 4 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
domain: tkestack.io
layout:
- go.kubebuilder.io/v3
projectName: cluster-fabric-operator
repo: github.com/tkestack/cluster-fabric-operator
projectName: knitnet-operator
repo: github.com/tkestack/knitnet-operator
resources:
- api:
crdVersion: v1
namespaced: true
controller: true
domain: tkestack.io
group: operator
kind: Fabric
path: github.com/tkestack/cluster-fabric-operator/api/v1alpha1
kind: Knitnet
path: github.com/tkestack/knitnet-operator/api/v1alpha1
version: v1alpha1
version: "3"
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<p align="center">
<a href="https://github.com/tkestack/cluster-fabric-operator">
<img src="https://github.com/tkestack/cluster-fabric-operator/workflows/CI%20Pipeline/badge.svg" alt="Github CI">
<a href="https://github.com/tkestack/knitnet-operator">
<img src="https://github.com/tkestack/knitnet-operator/workflows/CI%20Pipeline/badge.svg" alt="Github CI">
</a>
<a href="https://goreportcard.com/report/github.com/tkestack/cluster-fabric-operator">
<img src="https://goreportcard.com/badge/github.com/tkestack/cluster-fabric-operator" alt="GoReportCard">
<a href="https://goreportcard.com/report/github.com/tkestack/knitnet-operator">
<img src="https://goreportcard.com/badge/github.com/tkestack/knitnet-operator" alt="GoReportCard">
</a>
<a href="https://quay.io/repository/danielxlee/cluster-fabric-operator">
<a href="https://quay.io/repository/danielxlee/knitnet-operator">
<img src="https://img.shields.io/badge/container-ready-green" alt="Docker">
</a>
<a href="https://github.com/tkestack/cluster-fabric-operator/master/LICENSE">
<a href="https://github.com/tkestack/knitnet-operator/master/LICENSE">
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License">
</a>
</p>
Expand All @@ -17,7 +17,7 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [Cluster Fabric Operator](#cluster-fabric-operator)
- [Knitnet Operator](#knitnet-operator)
- [Architecture](#architecture)
- [Purpose](#purpose)
- [Supported Features](#supported-features)
Expand All @@ -28,9 +28,9 @@

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# Cluster Fabric Operator
# Knitnet Operator

A Golang based fabric operator that will make/oversee Submariner components on top of the Kubernetes.
A Golang based knitnet operator that will make/oversee Submariner components on top of the Kubernetes.

## Architecture

Expand All @@ -56,11 +56,11 @@ Here the features which are supported by this operator:-

### Example

The configuration of Fabric setup should be described in Fabric CRD. You will find all the examples manifests in [example](./config/samples) folder.
The configuration of Knitnet setup should be described in Knitnet CRD. You will find all the examples manifests in [example](./config/samples) folder.

### Prerequisites

Fabric operator requires a Kubernetes cluster of version `>=1.5.0`. If you have just started with Operators, its highly recommended to use latest version of Kubernetes. And the prepare 2 cluster, example `cluster-a` and `cluster-b`
Knitnet operator requires a Kubernetes cluster of version `>=1.5.0`. If you have just started with Operators, its highly recommended to use latest version of Kubernetes. And the prepare 2 cluster, example `cluster-a` and `cluster-b`

### Quickstart

Expand All @@ -69,23 +69,23 @@ The setup can be done by using `kustomize`.
1. Clone source code

```shell
$ git clone https://github.com/tkestack/cluster-fabric-operator.git
$ git clone https://github.com/tkestack/knitnet-operator.git
```

1. Deploy broker

- Install fabric operator
- Install knitnet operator

```shell
$ kubectl config use-context cluster-a
$ cd cluster-fabric-operator
$ cd knitnet-operator
$ make deploy
```

- Deploy broker on `cluster-a`

```shell
$ kubect -n cluster-fabric-operator-system apply -f .config/samples/operator_v1alpha1_fabric_deploy_broker.yaml
$ kubect -n knitnet-operator-system apply -f .config/samples/deploy_broker.yaml
```

- Export `submariner-broker-info` configmap to a yaml file
Expand All @@ -94,9 +94,9 @@ The setup can be done by using `kustomize`.
$ kubectl -n submariner-k8s-broker get cm submariner-broker-info -oyaml > submariner-k8s-broker.yaml
```

1. Join cluster to broker
2. Join cluster to broker

- Install fabric operator
- Install knitnet operator

```shell
$ kubectl config use-context cluster-b
Expand All @@ -112,5 +112,5 @@ The setup can be done by using `kustomize`.
- Join `cluster-a` to `cluster-b`

```shell
$ kubectl -n cluster-fabric-operator-system apply -f .config/samples/operator_v1alpha1_fabric_deploy_broker.yaml
$ kubectl -n knitnet-operator-system apply -f .config/samples/join_broker.yaml
```
32 changes: 16 additions & 16 deletions api/v1alpha1/fabric_types.go → api/v1alpha1/knitnet_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// FabricSpec defines the desired state of Fabric
type FabricSpec struct {
// KnitnetSpec defines the desired state of Knitnet
type KnitnetSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

Expand All @@ -48,12 +48,12 @@ type FabricSpec struct {
CloudPrepareConfig `json:"cloudPrepareConfig,omitempty"`
}

// FabricStatus defines the observed state of Fabric
type FabricStatus struct {
// KnitnetStatus defines the observed state of Knitnet
type KnitnetStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Phase is the fabric operator running phase.
// Phase is the knitnet operator running phase.
// +optional
Phase Phase `json:"phase,omitempty"`
}
Expand Down Expand Up @@ -180,8 +180,8 @@ type JoinConfig struct {
type CloudPrepareConfig struct {
// CredentialsSecret is a reference to the secret with a certain cloud platform
// credentials, the supported platform includes AWS, GCP, Azure, ROKS and OSD.
// The cluster-fabric-operator will use these credentials to prepare Submariner cluster
// environment. If the submariner cluster environment requires cluster-fabric-operator
// The knitnet-operator will use these credentials to prepare Submariner cluster
// environment. If the submariner cluster environment requires knitnet-operator
// preparation, this field should be specified.
// +optional
CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret,omitempty"`
Expand Down Expand Up @@ -210,28 +210,28 @@ type AWS struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
// +kubebuilder:resource:path=fabrics,shortName=fb,scope=Namespaced
// +kubebuilder:resource:path=knitnets,shortName=fb,scope=Namespaced
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=.metadata.creationTimestamp
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=.status.phase,description="Current Cluster Phase"
// +kubebuilder:printcolumn:name="Created At",type=string,JSONPath=.metadata.creationTimestamp
// Fabric is the Schema for the fabrics API
type Fabric struct {
// Knitnet is the Schema for the knitnets API
type Knitnet struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec FabricSpec `json:"spec,omitempty"`
Status FabricStatus `json:"status,omitempty"`
Spec KnitnetSpec `json:"spec,omitempty"`
Status KnitnetStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// FabricList contains a list of Fabric
type FabricList struct {
// KnitnetList contains a list of Knitnet
type KnitnetList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Fabric `json:"items"`
Items []Knitnet `json:"items"`
}

func init() {
SchemeBuilder.Register(&Fabric{}, &FabricList{})
SchemeBuilder.Register(&Knitnet{}, &KnitnetList{})
}
88 changes: 44 additions & 44 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fd2f4d9

Please sign in to comment.