move charts to charts dir
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,4 +3,3 @@
|
||||
*.srl
|
||||
*.csr
|
||||
users/
|
||||
charts/
|
||||
@@ -5,10 +5,10 @@
|
||||
### Quickstart
|
||||
|
||||
1. Start Docker
|
||||
2. Run createuserspace.sh
|
||||
2. Run createprojectspace.sh
|
||||
|
||||
```bash
|
||||
./createuserspace.sh <username> <server_fqdn>
|
||||
./createprojectspace.sh <server_fqdn> <username>
|
||||
```
|
||||
|
||||
### Update a user
|
||||
|
||||
10
adduser.sh
10
adduser.sh
@@ -18,7 +18,7 @@ echo "No server supplied for user $USER"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $USER=="admin" ]; then
|
||||
if [ $USER = "admin" ]; then
|
||||
echo "Creating admin user for server $SERVER"
|
||||
fi
|
||||
|
||||
@@ -33,7 +33,7 @@ fi
|
||||
echo "Generating openssl cert"
|
||||
docker run -it -v $CERT_DIR:/$USER python:latest openssl genrsa -out /$USER/$USER.key 2048
|
||||
|
||||
if [ $USER=="admin" ]; then
|
||||
if [ $USER = "admin" ]; then
|
||||
docker run -it -v $CERT_DIR:/$USER python:latest openssl req -new -key /$USER/$USER.key -out /$USER/$USER.csr -subj "/CN=$USER/O=system:masters"
|
||||
else
|
||||
docker run -it -v $CERT_DIR:/$USER python:latest openssl req -new -key /$USER/$USER.key -out /$USER/$USER.csr -subj "/CN=$USER/O=user"
|
||||
@@ -86,7 +86,7 @@ echo "adding server to config with new context $SERVER-$USER"
|
||||
kubectl config set-cluster $SERVER --server=https://$SERVER:6443 --certificate-authority=$CA_CERT_DIR/server-ca.pem
|
||||
kubectl config set-credentials $USER-$SERVER --client-certificate=$CERT_DIR/$USER.crt --client-key=$CERT_DIR/$USER.key
|
||||
|
||||
if [ $USER=="admin" ]; then
|
||||
if [ $USER = "admin" ]; then
|
||||
kubectl config set-context $SERVER-$USER --cluster=$SERVER --namespace=kube-system --user=$USER-$SERVER
|
||||
else
|
||||
kubectl config set-context $SERVER-$USER --cluster=$SERVER --namespace=$USER --user=$USER-$SERVER
|
||||
@@ -94,7 +94,7 @@ fi
|
||||
|
||||
kubectl config set current-context $SERVER-$USER
|
||||
|
||||
if [ $USER=="admin" ]; then
|
||||
if [ $USER = "admin" ]; then
|
||||
echo "Admin user created, skipping namespace"
|
||||
exit 0
|
||||
fi
|
||||
@@ -113,4 +113,4 @@ ssh $SERVER "kubectl apply -f $SERVER_USER_DIR/namespace.yaml"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to create namespace"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user