Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #767 from dacleyra/origin/updatecodewind0141
Browse files Browse the repository at this point in the history
updatecodewind0141
  • Loading branch information
kaczyns authored Aug 17, 2020
2 parents 9878057 + 9344770 commit c2eb486
Show file tree
Hide file tree
Showing 8 changed files with 380 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ IMAGE_SHA = $(lastword $(subst @, ,$(IMAGE_REPO_DIGEST)))
REGISTRY_IMAGE_SHA = $(lastword $(subst @, ,$(REGISTRY_IMAGE_REPO_DIGEST)))

# Current release (used for CSV management)
CURRENT_RELEASE=0.9.1
CURRENT_RELEASE=0.9.2

# OS detection
ifeq ($(OS),Windows_NT)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kabanero-codewind
subjects:
- kind: ServiceAccount
name: che-workspace
roleRef:
kind: ClusterRole
name: kabanero-codewind
apiGroup: rbac.authorization.k8s.io
2 changes: 1 addition & 1 deletion config/samples/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Kabanero
metadata:
name: kabanero
spec:
version: "0.9.1"
version: "0.9.2"
stacks:
repositories:
- name: central
Expand Down
6 changes: 3 additions & 3 deletions config/samples/full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
spec:
# The platform version determines the desired version for all components, but those
# can be overriden individually as well
version: "0.9.1"
version: "0.9.2"

targetNamespaces:
- kabanero
Expand Down Expand Up @@ -92,10 +92,10 @@ spec:

# Overrides the image as a separate repository or tag
repository: kabanero/che-devfile-registry
tag: "0.11.0"
tag: "0.14.1"

# Overrides the image uri
image: kabanero/che-devfile-registry:0.11.0
image: kabanero/che-devfile-registry:0.14.1

# Specifies a custom cluster role to user for the Che workspaces uses the default roles if left blank.
# The default value is kabanero-codewind.
Expand Down
16 changes: 16 additions & 0 deletions config/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ default: "0.9.1"

# Top level: relates Kabanero versions to software versions
kabanero:
- version: "0.9.2"
related-versions:
cli-services: "0.9.1"
landing: "0.9.0"
events: "0.9.0"
collection-controller: "0.9.1"
stack-controller: "0.9.1"
admission-webhook: "0.9.1"
sso: "7.3.2"
codeready-workspaces: "0.9.2"

- version: "0.9.1"
related-versions:
cli-services: "0.9.1"
Expand Down Expand Up @@ -130,6 +141,11 @@ related-software:
tag: "0.6.0"

codeready-workspaces:
- version: "0.9.2"
orchestrations: "orchestrations/codeready-workspaces/0.1"
identifiers:
devfile-reg-repository: "kabanero/che-devfile-registry"
devfile-reg-tag: "0.14.1"
- version: "0.9.0"
orchestrations: "orchestrations/codeready-workspaces/0.1"
identifiers:
Expand Down
13 changes: 13 additions & 0 deletions pkg/controller/kabaneroplatform/codereadyworkspaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var crwlog = rlog.Log.WithName("kabanero-codeready-workspaces")
const (
crwOrchestrationFilePath = "orchestrations/codeready-workspaces/0.1"
crwYamlNameCodewindClusterRole = "codewind-clusterrole.yaml"
crwYamlNameCodewindRoleBinding = "codewind-rolebinding.yaml"
crwYamlNameCodewindTektonRole = "codewind-tekton-role.yaml"
crwYamlNameCodewindTektonBinding = "codewind-tekton-rolebinding.yaml"
crwOperatorCR = "codeready-workspaces-cr.yaml"
Expand Down Expand Up @@ -76,6 +77,13 @@ func reconcileCRW(ctx context.Context, k *kabanerov1alpha2.Kabanero, c client.Cl
return err
}

// Deploy the Codewind rolebinding
err = processCRWYaml(ctx, k, rev, templateCtx, c, crwYamlNameCodewindRoleBinding, true, k.GetNamespace())
if err != nil {
logger.Error(err, fmt.Sprintf("Failed to Apply rolebinding resource. Revision: %v. TemplateCtx: %v", rev, templateCtx))
return err
}

// Deploy the Codewind Tekton role
err = processCRWYaml(ctx, k, rev, templateCtx, c, crwYamlNameCodewindTektonRole, true, "tekton-pipelines")
if err != nil {
Expand Down Expand Up @@ -485,6 +493,11 @@ func deleteCRWOperatorResources(ctx context.Context, k *kabanerov1alpha2.Kabaner
return err
}

err = processCRWYaml(ctx, k, rev, unstructured.Unstructured{}.Object, c, crwYamlNameCodewindRoleBinding, false, k.GetNamespace())
if err != nil {
return err
}

// Delete the Tekton role and rolebinding too
err = processCRWYaml(ctx, k, rev, unstructured.Unstructured{}.Object, c, crwYamlNameCodewindTektonRole, false, "tekton-pipelines")
if err != nil {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ channels:
- name: release-0.8
currentCSV: kabanero-operator.v0.8.0
- name: release-0.9
currentCSV: kabanero-operator.v0.9.1
currentCSV: kabanero-operator.v0.9.2
defaultChannel: release-0.9

0 comments on commit c2eb486

Please sign in to comment.