-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #261 from codekow/web-terminal
update: web terminal
- Loading branch information
Showing
14 changed files
with
175 additions
and
47 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# web-terminal | ||
|
||
Start a Web Terminal in your browser with common CLI tools for interacting with | ||
the cluster. | ||
|
||
**Note:** The Web Terminal Operator integrates with the OpenShift Console in | ||
OpenShift 4.5.3 and higher to simplify Web Terminal instance creation and | ||
automate OpenShift login. In earlier versions of OpenShift, the operator can | ||
be installed but Web Terminals will have to be created and accessed manually. | ||
|
||
## Description | ||
The Web Terminal Operator leverages the | ||
[DevWorkspace Operator](https://github.com/devfile/devworkspace-operator) | ||
to provision enviroments which support common cloud CLI tools. When this | ||
operator is installed, the DevWorkspace Operator will be installed as a | ||
dependency. | ||
|
||
## How to Install | ||
Press the **Install** button, choose the upgrade strategy, and wait for the | ||
**Installed** Operator status. | ||
|
||
When the operator is installed, you will see a terminal button appear on the | ||
top right of the console after refreshing the OpenShift console window. | ||
|
||
## How to Uninstall | ||
The Web Terminal Operator requires manual steps to fully uninstall the operator. | ||
As the Web Terminal Operator is designed as a way to access the OpenShift | ||
cluster, Web Terminal instances store user credentials. To avoid exposing these | ||
credentials to unwanted parties, the operator deploys webhooks and finalizers | ||
that aren't removed when the operator is uninstalled. See the | ||
[uninstall guide](https://docs.openshift.com/container-platform/latest/web_console/odc-about-web-terminal.html) | ||
for more details. | ||
|
||
## Known Issues | ||
1. [Occasionally you will need to press enter to get a prompt inside of the web-terminal](https://issues.redhat.com/browse/WTO-43) | ||
2. [DevWorkspace is created but not opened after previous devworkspace is removed](https://issues.redhat.com/browse/WTO-44) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Web Terminal | ||
|
||
Install Web Terminal. | ||
|
||
Do not use the `base` directory directly, as you will need to patch the `channel` based on the version of OpenShift you are using, or the version of the operator you want to use. | ||
|
||
The current *overlays* available are for the following channels: | ||
|
||
* [fast](operator/overlays/fast) | ||
|
||
## Usage | ||
|
||
If you have cloned the `gitops-catalog` repository, you can install Web Terminal based on the overlay of your choice by running from the root (`gitops-catalog`) directory. | ||
|
||
``` | ||
oc apply -k web-terminal/operator/overlays/<channel> | ||
``` | ||
|
||
Or, without cloning: | ||
|
||
``` | ||
oc apply -k https://github.com/redhat-cop/gitops-catalog/web-terminal/operator/overlays/<channel> | ||
``` | ||
|
||
As part of a different overlay in your own GitOps repo: | ||
|
||
``` | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- https://github.com/redhat-cop/gitops-catalog/web-terminal/operator/overlays/<channel>?ref=main | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
commonAnnotations: | ||
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true | ||
|
||
resources: | ||
- ../../../operator/overlays/fast | ||
- ../../../instance/overlays/default |
3 changes: 1 addition & 2 deletions
3
...operator/operator/base/kustomization.yaml → ...terminal/instance/base/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
namespace: openshift-operators | ||
|
||
resources: | ||
- subscription.yaml | ||
- web-terminal-tooling.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: workspace.devfile.io/v1alpha2 | ||
kind: DevWorkspaceTemplate | ||
metadata: | ||
annotations: | ||
controller.devfile.io/allow-import-from: '*' | ||
name: web-terminal-tooling | ||
labels: | ||
console.openshift.io/terminal: 'true' | ||
spec: | ||
components: | ||
- container: | ||
args: | ||
- tail | ||
- '-f' | ||
- /dev/null | ||
cpuLimit: 400m | ||
cpuRequest: 100m | ||
image: registry.redhat.io/web-terminal/web-terminal-tooling-rhel8@sha256:657874adad93a9e6c2b746b836015de410d2e280f85c079c81e24ae81343fa6c | ||
memoryLimit: 512Mi | ||
memoryRequest: 128Mi | ||
mountSources: false | ||
sourceMapping: /projects | ||
name: web-terminal-tooling |
5 changes: 5 additions & 0 deletions
5
web-terminal/instance/overlays/default/exclude-default-template.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$patch: delete | ||
apiVersion: workspace.devfile.io/v1alpha2 | ||
kind: DevWorkspaceTemplate | ||
metadata: | ||
name: web-terminal-tooling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
web-terminal/instance/overlays/enhanced/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
namespace: openshift-operators | ||
|
||
resources: | ||
- ../../base | ||
|
||
patches: | ||
# https://github.com/redhat-developer/web-terminal-operator | ||
- target: | ||
group: workspace.devfile.io | ||
kind: DevWorkspaceTemplate | ||
name: web-terminal-tooling | ||
path: web-terminal-tooling.yaml |
35 changes: 35 additions & 0 deletions
35
web-terminal/instance/overlays/enhanced/web-terminal-tooling.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: workspace.devfile.io/v1alpha2 | ||
kind: DevWorkspaceTemplate | ||
metadata: | ||
annotations: | ||
controller.devfile.io/allow-import-from: '*' | ||
web-terminal.redhat.com/unmanaged-state: 'true' | ||
name: web-terminal-tooling | ||
labels: | ||
console.openshift.io/terminal: 'true' | ||
spec: | ||
components: | ||
- name: web-terminal-tooling | ||
container: | ||
env: | ||
- name: YOLO_URL | ||
value: https://raw.githubusercontent.com/codekow/demo-ai-gitops-catalog/main/scripts/library/term.sh | ||
args: | ||
- "/bin/bash" | ||
- "-c" | ||
- | | ||
#!/bin/bash | ||
# set -x | ||
. <(curl -s "${YOLO_URL}" | tee /tmp/yolo.sh) | ||
term_init | ||
sleep infinity # just in case | ||
cpuLimit: 400m | ||
cpuRequest: 100m | ||
image: registry.redhat.io/web-terminal/web-terminal-tooling-rhel8@sha256:657874adad93a9e6c2b746b836015de410d2e280f85c079c81e24ae81343fa6c | ||
memoryLimit: 256Mi | ||
memoryRequest: 128Mi | ||
mountSources: false | ||
sourceMapping: /projects |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- subscription.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- ../../base | ||
|
||
patches: | ||
- target: | ||
kind: Subscription | ||
name: web-terminal | ||
path: patch-channel.yaml |
File renamed without changes.