Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add console link #71

Merged
merged 8 commits into from
Sep 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Gopkg.lock

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

4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ required = [
# revision for tag "kubernetes-1.12.3"
revision = "0cd23ebeb6882bd1cdc2cb15fc7b2d72e8a86a5b"

[[constraint]]
name = "github.com/openshift/api"
branch = "release-4.2"

[[override]]
name = "k8s.io/apimachinery"
# revision for tag "kubernetes-1.12.3"
Expand Down
25 changes: 20 additions & 5 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
package main

import (

"context"
"flag"
"fmt"
Expand All @@ -33,10 +32,27 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/runtime/signals"
//logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"

)

func setLogLevel() {
logLevel, isFound := os.LookupEnv("LOG_LEVEL")
if isFound && len(logLevel) > 0 {
parsedLevel, err := logrus.ParseLevel(logLevel)
if err == nil {
logrus.SetLevel(parsedLevel)
logrus.Infof("Configured '%s' log level is applied", logLevel)
} else {
logrus.Errorf("Failed to parse log level `%s`. Possible values: panic, fatal, error, warn, info, debug. Default 'info' is applied", logLevel)
logrus.SetLevel(logrus.InfoLevel)
}
} else {
logrus.Infof("Default 'info' log level is applied")
logrus.SetLevel(logrus.InfoLevel)
}
}

func printVersion() {
setLogLevel()
logrus.Infof(fmt.Sprintf("Go Version: %s", runtime.Version()))
logrus.Infof(fmt.Sprintf("Go OS/Arch: %s/%s", runtime.GOOS, runtime.GOARCH))
logrus.Infof(fmt.Sprintf("operator-sdk Version: %v", sdkVersion.Version))
Expand All @@ -55,7 +71,6 @@ func printVersion() {
}
}
logrus.Infof(fmt.Sprintf("Operator is running on %v", infra))

}

func main() {
Expand All @@ -64,7 +79,7 @@ func main() {
printVersion()
namespace, err := k8sutil.GetWatchNamespace()
if err != nil {
logrus.Errorf( "Failed to get watch namespace. Using default namespace eclipse-che: %s", err)
logrus.Errorf("Failed to get watch namespace. Using default namespace eclipse-che: %s", err)
namespace = "eclipse-che"
}

Expand Down Expand Up @@ -93,7 +108,7 @@ func main() {
os.Exit(1)
}

logrus.Info("Registering Components")
logrus.Info("Registering Che Components Types")

// Setup Scheme for all resources
if err := apis.AddToScheme(mgr.GetScheme()); err != nil {
Expand Down
11 changes: 11 additions & 0 deletions deploy/cluster_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,14 @@ rules:
- users
verbs:
- list
- apiGroups:
- console.openshift.io
resources:
- consolelinks
verbs:
- get
- list
- create
- update
- patch
- delete
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: checlusters.org.eclipse.che
spec:
group: org.eclipse.che
names:
kind: CheCluster
listKind: CheClusterList
plural: checlusters
singular: checluster
scope: Namespaced
version: v1
subresources:
status: {}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--- /home/serg/gocode/src/github.com/eclipse/che-operator/olm/eclipse-che-preview-kubernetes/deploy/olm-catalog/eclipse-che-preview-kubernetes/9.9.9-nightly.1567514659/eclipse-che-preview-kubernetes.v9.9.9-nightly.1567514659.clusterserviceversion.yaml 2019-09-03 15:44:20.818513956 +0300
+++ /home/serg/gocode/src/github.com/eclipse/che-operator/olm/eclipse-che-preview-kubernetes/deploy/olm-catalog/eclipse-che-preview-kubernetes/9.9.9-nightly.1567522875/eclipse-che-preview-kubernetes.v9.9.9-nightly.1567522875.clusterserviceversion.yaml 2019-09-03 18:01:15.684301328 +0300
@@ -49,12 +49,12 @@
categories: Developer Tools
certified: "false"
containerImage: quay.io/eclipse/che-operator:nightly
- createdAt: "2019-09-03T12:44:20Z"
+ createdAt: "2019-09-03T15:01:15Z"
description: A Kube-native development solution that delivers portable and collaborative
developer workspaces.
repository: https://github.com/eclipse/che-operator
support: Eclipse Foundation
- name: eclipse-che-preview-kubernetes.v9.9.9-nightly.1567514659
+ name: eclipse-che-preview-kubernetes.v9.9.9-nightly.1567522875
namespace: placeholder
spec:
apiservicedefinitions: {}
@@ -350,5 +350,5 @@
maturity: stable
provider:
name: Eclipse Foundation
- replaces: eclipse-che-preview-kubernetes.v9.9.9-nightly.1567437268
- version: 9.9.9-nightly.1567514659
+ replaces: eclipse-che-preview-kubernetes.v9.9.9-nightly.1567514659
+ version: 9.9.9-nightly.1567522875
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
channels:
- currentCSV: eclipse-che-preview-kubernetes.v9.9.9-nightly.1567437268
- currentCSV: eclipse-che-preview-kubernetes.v9.9.9-nightly.1567522875
name: nightly
- currentCSV: eclipse-che-preview-kubernetes.v7.0.0
name: stable
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: checlusters.org.eclipse.che
spec:
group: org.eclipse.che
names:
kind: CheCluster
listKind: CheClusterList
plural: checlusters
singular: checluster
scope: Namespaced
version: v1
subresources:
status: {}
Loading