feat(kubeapps): add support for tokenless login (#18259)

**Description**
This adds alpha code to test if we can make kubeapps work without pesky
token login.

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
For production use of this, users should explicitly:
A. Setup NetworkPolicies
B. Add a GOOD authentication proxy in front

**✔️ Checklist:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ I increased versions for any altered app according to semantic
versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._

---------

Signed-off-by: Kjeld Schouten <info@kjeldschouten.nl>
Co-authored-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com>
This commit is contained in:
Kjeld Schouten
2024-02-17 13:40:00 +01:00
committed by GitHub
parent b874cffb26
commit 512dea10b6
4 changed files with 73 additions and 26 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
name: Test SCALE Catalog
runs-on: ubuntu-latest
container:
image: tccr.io/tccr/devcontainer:4.0.0
image: tccr.io/tccr/devcontainer:v4.0.0
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
name: Checkout
+3 -3
View File
@@ -10,7 +10,7 @@ apiVersion: v2
appVersion: latest
dependencies:
- name: common
version: 17.3.9
version: 17.4.2
repository: oci://tccr.io/truecharts
condition: ""
alias: ""
@@ -20,7 +20,7 @@ dependencies:
version: 14.3.3
repository: https://charts.bitnami.com/bitnami
condition: ""
alias: kubeapps
alias: ogkubeapps
tags: []
import-values: []
deprecated: false
@@ -42,4 +42,4 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/enterprise/kubeapps
- https://github.com/truecharts/containers/tree/master/apps/alpine
type: application
version: 1.0.0
version: 1.1.0
+24 -2
View File
@@ -5,8 +5,30 @@ portals:
questions:
# Include{global}
# Include{serviceRoot}
- variable: main
label: "token-bypass Service"
description: "The token-bypass service"
schema:
additional_attrs: true
type: dict
attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
- variable: main
label: "token-bypass Service Port Configuration"
schema:
additional_attrs: true
type: dict
attrs:
- variable: port
label: "Port"
description: "This port exposes the container port on the service"
schema:
type: int
default: 8080
required: true
- variable: tckubeapps
label: "Main Service"
label: "KubeApps Service"
description: "The Primary service on which the healthcheck runs, often the webUI"
schema:
additional_attrs: true
@@ -15,7 +37,7 @@ questions:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
- variable: tckubeapps
label: "Main Service Port Configuration"
label: "KubeApps Service Port Configuration"
schema:
additional_attrs: true
type: dict
+45 -20
View File
@@ -1,28 +1,60 @@
image:
pullPolicy: IfNotPresent
repository: tccr.io/tccr/alpine
tag: latest@sha256:ade0065e19edaa4f6903d464ee70605111a48394536deb94f31b661264704558
manifestManager:
enabled: false
repository: ghcr.io/xstar97/my-proxy-service
tag: v0.0.2@sha256:8d25a6ff316f140be1f198376e84208902ddf61a38a78076c1b11a81924d4019
operator:
register: false
portal:
open:
enabled: false
enabled: true
podOptions:
automountServiceAccountToken: true
workload:
main:
enabled: false
enabled: true
primary: true
type: Deployment
podSpec:
containers:
main:
enabled: true
primary: true
env:
PORT: 3000
API_FILE: /var/run/secrets/kubernetes.io/serviceaccount/token
PROXY_TARGET: http://tckubeapps:8080
probes:
liveness:
enabled: true
type: tcp
port: 3000
readiness:
enabled: true
type: tcp
port: 3000
startup:
enabled: true
type: tcp
port: 3000
service:
main:
enabled: false
ports:
main:
enabled: false
tckubeapps:
enabled: true
primary: true
expandObjectName: false
ports:
main:
enabled: true
primary: true
port: 3000
targetPort: 3000
tckubeapps:
enabled: true
expandObjectName: false
labels:
truecharts.org/flagged: "true"
selectorLabels:
@@ -39,14 +71,7 @@ serviceAccount:
kubeapps-operator:
enabled: true
primary: true
secret:
kubeapps-operator-token:
enabled: true
type: kubernetes.io/service-account-token
annotations:
kubernetes.io/service-account.name: kubeapps-operator
stringData: "-"
targetSelectAll: true
rbac:
kubeapps-operator:
@@ -59,7 +84,7 @@ rbac:
resources: ["*"]
verbs: ["*"]
kubeapps:
ogkubeapps:
frontend:
podLabels:
truecharts.org/kahack: frontend