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

[WIP] Initial version of a Podman Desktop extension to embed the streams console in PD UI #805

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
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
18 changes: 10 additions & 8 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@ version: '3.9'
services:
console-api:
image: ${CONSOLE_API_IMAGE}
container_name: console-api
network_mode: host
volumes:
- ${PWD}/console-config.yaml:/deployments/console-config.yaml:z
ports:
- :8080
environment:
CONSOLE_CONFIG_PATH: /deployments/console-config.yaml
QUARKUS_KUBERNETES_CLIENT_API_SERVER_URL: ${CONSOLE_API_KUBERNETES_API_SERVER_URL}
QUARKUS_KUBERNETES_CLIENT_TRUST_CERTS: "true"
QUARKUS_KUBERNETES_CLIENT_TOKEN: ${CONSOLE_API_SERVICE_ACCOUNT_TOKEN}
labels:
io.streamshub.console.container: api

console-ui:
image: ${CONSOLE_UI_IMAGE}
container_name: console-ui
network_mode: host
ports:
- :3000
environment:
HOSTNAME: localhost
PORT: 3005
CONSOLE_METRICS_PROMETHEUS_URL: ${CONSOLE_METRICS_PROMETHEUS_URL}
NEXTAUTH_SECRET: ${CONSOLE_UI_NEXTAUTH_SECRET}
NEXTAUTH_URL: http://localhost:3005
BACKEND_URL: http://localhost:8080/
NEXTAUTH_URL: http://localhost:3000
BACKEND_URL: http://console-api:8080/
labels:
io.streamshub.console.container: ui
1 change: 1 addition & 0 deletions podman-desktop-extension/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
18 changes: 18 additions & 0 deletions podman-desktop-extension/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# EditorConfig is awesome: http://EditorConfig.org

# https://github.com/jokeyrhyme/standard-editorconfig

# top-most EditorConfig file
root = true

# defaults
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 2
indent_style = space

[*.md]
trim_trailing_whitespace = false
6 changes: 6 additions & 0 deletions podman-desktop-extension/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build
*.config.js
__mocks__
coverage
packages/backend/media/**
tests/
93 changes: 93 additions & 0 deletions podman-desktop-extension/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"root": true,
"env": {
"es2021": true,
"node": true,
"browser": false
},
"extends": [
"eslint:recommended",
/** @see https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#recommended-configs */
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:etc/recommended",
"plugin:sonarjs/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module",
"project": [
"packages/*/tsconfig.json",
"tests/playwright/tsconfig.json"
]
},
"settings": {
"import/resolver": {
"typescript": true,
"node": true,
"eslint-import-resolver-custom-alias": {
"alias": {
"/@": "./src",
"/@gen": "./src-generated"
},
"extensions": [".ts"],
"packages": ["packages/*"]
}
}
},
"ignorePatterns": [
"node_modules/**",
"**/dist/**"
],
"plugins": ["@typescript-eslint", "sonarjs", "etc", "redundant-undefined", "no-null"],
"rules": {
"eqeqeq": "error",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-explicit-any": "error",
"prefer-promise-reject-errors": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"no-null/no-null": "error",

/**
* Having a semicolon helps the optimizer interpret your code correctly.
* This avoids rare errors in optimized code.
* @see https://twitter.com/alex_kozack/status/1364210394328408066
*/
"semi": [
"error",
"always"
],
/**
* This will make the history of changes in the hit a little cleaner
*/
"comma-dangle": [
"warn",
"always-multiline"
],
/**
* Just for beauty
*/
"quotes": ["error", "single", { "allowTemplateLiterals": true }],
"import/no-duplicates": "error",
"import/no-unresolved": "off",
"import/default": "off",
"import/no-named-as-default-member": "off",
"import/no-named-as-default": "off",
"sonarjs/cognitive-complexity": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-empty-collection": "off",
"sonarjs/no-small-switch": "off",
"etc/no-commented-out-code": "error",
"etc/no-deprecated": "off",
"redundant-undefined/redundant-undefined": "error",
"import/no-extraneous-dependencies": "error"
}
}
1 change: 1 addition & 0 deletions podman-desktop-extension/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
59 changes: 59 additions & 0 deletions podman-desktop-extension/.github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Bug 🐞
description: Report a bug report
labels: [kind/bug 🐞]

body:
- type: markdown
attributes:
value: |
Before opening a bug report, please search for the behaviour in the existing issues.

---

Thank you for taking the time to file a bug report. To address this bug as fast as possible, we need some information.

- type: textarea
id: bug-description
attributes:
label: Bug description
description: What happened?
validations:
required: true

- type: input
id: os
attributes:
label: Operating system
description: "Which operating system are you on? Please provide the version as well. If you are on a Mac, please specify Apple silicon or Intel."
placeholder: "macOS Ventura 13.4 (Arm), Windows 11"
validations:
required: true

- type: dropdown
id: version
attributes:
label: Version
description: What version of the bootable container extension are you running?
options:
- "next (development version)"
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: What steps do we need to take to reproduce this error?

- type: textarea
id: logs
attributes:
label: Relevant log output
description: If applicable, provide relevant log output.
render: shell

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots here.
1 change: 1 addition & 0 deletions podman-desktop-extension/.github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
42 changes: 42 additions & 0 deletions podman-desktop-extension/.github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Enhancement ✨
description: Suggest an enhancement to an existing feature
labels: [kind/enhancement ✨]

body:
- type: markdown
attributes:
value: |
Before opening a new enhancement, please search for potential existing issues.

---

Thank you for taking the time to file an enhancement request, we appreciate and value your time to help the project!

- type: textarea
id: problem
attributes:
label: Is your enhancement related to a problem? Please describe
description: A clear and concise description of what the problem is.
placeholder: I'm always frustrated when [...]
validations:
required: true

- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots here.
25 changes: 25 additions & 0 deletions podman-desktop-extension/.github/ISSUE_TEMPLATE/epic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Epic ⚡
description: A high-level feature
labels: [kind/epic ⚡]

body:
- type: markdown
attributes:
value: |
Epics are normally created by the development team, to group a set of related features and plan work across multiple sprints.
The features this epic includes are referenced with the text of the epic.

- type: textarea
id: domain
attributes:
label: Epic domain
description: A clear and concise description of the feature area or domain that this epic will address.
placeholder: The bootable container extension should support [...]
validations:
required: true

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Feature 💡
description: Suggest an idea for this project
labels: [kind/feature 💡]

body:
- type: markdown
attributes:
value: |
Before opening a feature request, please search for potential existing issues.

---

Thank you for taking the time to file a feature request, we appreciate and value your time to help the project!

- type: textarea
id: problem
attributes:
label: Is your feature request related to a problem? Please describe
description: A clear and concise description of what the problem is.
placeholder: I'm always frustrated when [...]
validations:
required: true

- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots here.
15 changes: 15 additions & 0 deletions podman-desktop-extension/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### What does this PR do?

### Screenshot / video of UI

<!-- If this PR is changing UI, please include
screenshots or screencasts showing the difference -->

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

### How to test this PR?

<!-- Please explain steps to reproduce -->
15 changes: 15 additions & 0 deletions podman-desktop-extension/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Set update schedule for GitHub Actions

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 10

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
Loading