Skip to content

Commit

Permalink
feat: prepare for v4 (#13)
Browse files Browse the repository at this point in the history
* feat: prepare for v4

* add missing newline

* fix: update versions

* fix: use latest unleash image

* fix: more adjustments on comments

* fix: readme lint

* fix: lint

* fix: lint
  • Loading branch information
ivarconr authored Jun 13, 2021
1 parent 1735e9f commit 1cf6d6b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 91 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ helm repo add unleash https://docs.getunleash.io/helm-charts

You can then run `helm search repo unleash` to see the charts.

## Versions

- 1.x includes Unleash v3.x
- 2.x includes Unleash v4.x

## Contributing

The source code of all [unleash](https://unleash.github.io/) [Helm](https://helm.sh) charts can be found on Github: <https://github.com/unleash/helm-charts/>
Expand Down
6 changes: 3 additions & 3 deletions charts/unleash/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v2
appVersion: "3.17.6"
appVersion: "4.0.4"
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 10.3.1
version: 10.4.10
condition: postgresql.enabled
description: Unleash is a open source feature flag & toggle system, that gives you a great overview over all feature toggles across all your applications and services.
maintainers:
Expand All @@ -16,4 +16,4 @@ sources:
- https://github.com/Unleash/unleash-docker
- https://github.com/Unleash/helm-charts
type: application
version: 1.1.1
version: 2.0.0
96 changes: 8 additions & 88 deletions charts/unleash/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,95 +20,15 @@ affinity: {}
autoscaling:
enabled: false

# This is a working example of Unleash with Google OAuth2 for the frontend and
# a shared secret for secure communication with a backend service.
configMaps: {}
# index.js:
# mountPath: /index.js
# content: |-
# 'use strict';
#
# const unleash = require('unleash-server');
# const passport = require('@passport-next/passport');
# const GoogleOAuth2Strategy = require('@passport-next/passport-google-oauth2');
#
# const sharedSecret = process.env.SHARED_SECRET;
#
# passport.use(
# new GoogleOAuth2Strategy(
# {
# clientID: process.env.GOOGLE_CLIENT_ID,
# clientSecret: process.env.GOOGLE_CLIENT_SECRET,
# callbackURL: process.env.GOOGLE_CALLBACK_URL,
# },
# (accessToken, refreshToken, profile, cb) => {
# cb(
# null,
# new unleash.User({
# name: profile.displayName,
# email: profile.emails[0].value,
# }),
# );
# },
# ),
# );
# Unleash v4 comes with basic username/password and API tokens.
#
# function googleAdminAuth(app) {
# app.use(passport.initialize());
# app.use(passport.session());
# passport.serializeUser((user, done) => done(null, user));
# passport.deserializeUser((user, done) => done(null, user));
# To login the first time use the following:
# username: admin
# password: unleash4all
#
# app.get(
# '/api/admin/login',
# passport.authenticate('google', { scope: ['email'] }),
# );
# app.get(
# '/api/auth/callback',
# passport.authenticate('google', {
# failureRedirect: '/api/admin/error-login',
# }),
# (req, res) => {
# res.redirect('/');
# },
# );
#
# app.use('/api/client', (req, res, next) => {
# if (req.header('authorization') !== sharedSecret) {
# res.sendStatus(401);
# } else {
# next();
# }
# });
# app.use('/api/admin/', (req, res, next) => {
# if (req.user) {
# next();
# } else {
# return res
# .status('401')
# .json(
# new unleash.AuthenticationRequired({
# path: '/api/admin/login',
# type: 'custom',
# message: `You have to identify yourself in order to use Unleash. Click the button and follow the instructions.`,
# }),
# )
# .end();
# }
# });
# }
#
# const options = {
# enableLegacyRoutes: false,
# adminAuthentication: 'custom',
# preRouterHook: googleAdminAuth,
# };
#
# unleash.start(options).then(instance => {
# console.log(
# `Unleash started on http://localhost:${instance.app.get('port')}`,
# );
# });
# You can also add your own custom auth:
# https://github.com/Unleash/unleash-examples/tree/main/v4
configMaps: {}

containerPort: 4242

Expand Down Expand Up @@ -145,7 +65,7 @@ fullnameOverride: ""

image:
repository: unleashorg/unleash-server
tag: 3.17.6
tag: 4.0.4
pullPolicy: Always

imagePullSecrets: []
Expand Down

0 comments on commit 1cf6d6b

Please sign in to comment.