-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updating to traefik v2 * Updating to traefik v2 * Adding TLS Option * Adding Traefik Nodeport static option * Adding Traefik Nodeport static script to Makkefile * Addincondition in install_karavi_auth * Adding TLSStore manifest * Setting TLS min version to 1.2 * Updating k3s version to 1.25.5k3s2 * Changing cosnt name to authTLSOptionManifest * Setting A graded cipherSuites * Deleting traefik as part of install script * Updated copyright year.
- Loading branch information
1 parent
4e97b0d
commit 34615f6
Showing
8 changed files
with
199 additions
and
51 deletions.
There are no files selected for viewing
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
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,53 +1,50 @@ | ||
apiVersion: networking.k8s.io/v1beta1 | ||
kind: Ingress | ||
apiVersion: traefik.containo.us/v1alpha1 | ||
kind: IngressRoute | ||
metadata: | ||
annotations: | ||
kubernetes.io/ingress.class: traefik | ||
creationTimestamp: null | ||
name: proxy-server | ||
namespace: karavi | ||
annotations: | ||
kubernetes.io/ingress.class: "traefik" | ||
traefik.protocol: https | ||
traefik.ingress.kubernetes.io/frontend-entry-points: h2c, https | ||
traefik.ingress.kubernetes.io/redirect-entry-point: https | ||
traefik.ingress.kubernetes.io/redirect-permanent: "true" | ||
spec: | ||
entryPoints: | ||
- web | ||
- websecure | ||
routes: | ||
- kind: Rule | ||
match: Host(`temporary.Host.Name`) && PathPrefix(`/`) | ||
middlewares: [] | ||
priority: 0 | ||
services: | ||
- kind: Service | ||
name: proxy-server | ||
namespace: karavi | ||
port: 8080 | ||
tls: | ||
- hosts: | ||
#this hostName will be replaced by the installer configuration | ||
- temporary.Host.Name | ||
secretName: karavi-auth-tls | ||
rules: | ||
- host: "temporary.Host.Name" | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
serviceName: proxy-server | ||
servicePort: 8080 | ||
--- | ||
apiVersion: networking.k8s.io/v1beta1 | ||
kind: Ingress | ||
apiVersion: traefik.containo.us/v1alpha1 | ||
kind: IngressRoute | ||
metadata: | ||
name: grpc-services | ||
namespace: karavi | ||
annotations: | ||
ingress.kubernetes.io/protocol: h2c | ||
kubernetes.io/ingress.class: traefik | ||
traefik.protocol: https | ||
traefik.ingress.kubernetes.io/frontend-entry-points: h2c,https | ||
traefik.ingress.kubernetes.io/redirect-entry-point: https | ||
traefik.ingress.kubernetes.io/redirect-permanent: "true" | ||
creationTimestamp: null | ||
name: grpc-services | ||
namespace: karavi | ||
spec: | ||
entryPoints: | ||
- web | ||
- websecure | ||
routes: | ||
- kind: Rule | ||
match: Host(`grpc.tenants.cluster`) && PathPrefix(`/`) | ||
middlewares: [] | ||
priority: 0 | ||
services: | ||
- kind: Service | ||
name: tenant-service | ||
namespace: karavi | ||
port: 50051 | ||
scheme: h2c | ||
tls: | ||
- hosts: | ||
- grpc.tenants.cluster | ||
secretName: karavi-auth-tls | ||
rules: | ||
- host: "grpc.tenants.cluster" | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
serviceName: tenant-service | ||
servicePort: grpc | ||
secretName: karavi-auth-tls |
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,17 @@ | ||
apiVersion: traefik.containo.us/v1alpha1 | ||
kind: TLSOption | ||
metadata: | ||
name: default | ||
namespace: karavi | ||
spec: | ||
minVersion: VersionTLS12 | ||
cipherSuites: | ||
- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA | ||
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 | ||
- TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA | ||
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 | ||
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 | ||
- TLS_RSA_WITH_AES_128_CBC_SHA | ||
- TLS_RSA_WITH_AES_128_GCM_SHA256 | ||
- TLS_RSA_WITH_AES_256_CBC_SHA | ||
- TLS_RSA_WITH_AES_256_GCM_SHA384 |
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: traefik.containo.us/v1alpha1 | ||
kind: TLSStore | ||
metadata: | ||
name: default | ||
namespace: karavi | ||
|
||
spec: | ||
defaultCertificate: | ||
secretName: karavi-auth-tls |
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,71 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2023 Dell Inc., or its subsidiaries. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
helpFunction() | ||
{ | ||
echo "" | ||
echo "Usage: $0 --traefik_web_port web_port --traefik_websecure_port websecure_port" | ||
echo -e "\t--traefik_web_port Traefik Nodeport web static port" | ||
echo -e "\t--traefik_websecure_port Traefik Nodeport websecure static port" | ||
echo "" | ||
echo "Example: $0 --traefik_web_port 30001 --traefik_websecure_port 30002" | ||
echo "" | ||
exit 1 # Exit script after printing help | ||
} | ||
|
||
|
||
while getopts ":h-:" optchar; do | ||
case "${optchar}" in | ||
-) | ||
case "${OPTARG}" in | ||
traefik_web_port) val="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 )) | ||
#echo "Parsing option: '--${OPTARG}', value: '${val}'" >&2; | ||
webPort=${val} | ||
;; | ||
traefik_websecure_port) val="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 )) | ||
#echo "Parsing option: '--${OPTARG}', value: '${val}'" >&2; | ||
websecurePort=${val} | ||
;; | ||
help) | ||
helpFunction | ||
exit 0 | ||
;; | ||
*) | ||
echo "Unknown option --${OPTARG}" | ||
echo "For help, run $PROG --help" | ||
exit 1 | ||
;; | ||
esac | ||
;; | ||
*) | ||
echo "Unknown option -${OPTARG}" | ||
echo "For help, run $PROG --help" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
# Print helpFunction in case parameters are empty | ||
if [ -z "$webPort" ] || [ -z "$websecurePort" ] | ||
then | ||
echo "Some or all of the parameters are empty"; | ||
helpFunction | ||
fi | ||
|
||
# Begin script in case all parameters are correct | ||
echo "Setting Traefik Nodeport web to $webPort" | ||
k3s kubectl patch svc/traefik -n kube-system --type='json' -p='[{"op": "replace", "path": "/spec/ports/0/nodePort", "value":'$webPort'}]' | ||
echo "Setting Traefik Nodeport websecure to $websecurePort" | ||
k3s kubectl patch svc/traefik -n kube-system --type='json' -p='[{"op": "replace", "path": "/spec/ports/1/nodePort", "value":'$websecurePort'}]' |