Skip to content

Commit 7d2c64d

Browse files
committed
Added jumppods basic auth - installation helm template & values
1 parent b789914 commit 7d2c64d

File tree

7 files changed

+195
-1
lines changed

7 files changed

+195
-1
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ Helm chart for devopscorner services (Semantic Version)
88
- [Helmfile](https://github.com/roboll/helmfile) CLI
99

1010

11+
## Version 1.2
12+
13+
### Features
14+
15+
- Added Jumppods (Jump Host Pods) for maintenance EKS inside pods (`curl`, `wget`, `telnet`, `ping`, etc), securing with basic-auth access inside ingress-nginx
16+
17+
---
18+
1119
## Version 1.1
1220

1321
### Features

helmfile/auth

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
jumppods-admin:$2y$10$pfimLRkeJL/1RcW6Koe0uujoB0xZh4hQVU3uDCRdkqqQh1jlAAQaG

helmfile/basic-auth.txt

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
=============================
2+
References:
3+
- https://github.com/kubernetes/ingress-nginx/tree/main/docs/examples/auth/basic
4+
- https://www.askapache.com/online-tools/htpasswd-generator/
5+
=============================
6+
7+
htpasswd -c auth jumppods-admin > jumppods-auth/auth
8+
---
9+
jumppods-admin
10+
6T2pull8UB6aKKvC
11+
12+
=============================
13+
Filename: auth (jumppods)
14+
=============================
15+
## SHA
16+
jumppods-admin:{SHA}8N4ap0CfmbTulo0utyLz9m4NBOA=
17+
## Crypt
18+
jumppods-admin:92FYck7tvCPXA
19+
## Bcrypt
20+
jumppods-admin:$2y$10$pfimLRkeJL/1RcW6Koe0uujoB0xZh4hQVU3uDCRdkqqQh1jlAAQaG
21+
## MD5
22+
jumppods-admin:$apr1$v5pjz34h$9lnJ98EBgn7MCjNAx9Lvt/
23+
## Digest
24+
jumppods-admin:Authentication Required - Jumppods:1f5700303099e203d3c927e7bfc29b6f
25+
26+
=============================
27+
Kubernetes Secret
28+
=============================
29+
kubectl create secret generic jumppods-auth \
30+
--from-file=jumppods-auth/auth -n jumppods
31+
32+
kubectl get secret jumppods-auth -o yaml -n jumppods
33+
34+
---
35+
apiVersion: v1
36+
data:
37+
auth: anVtcHBvZHMtYWRtaW46JDJ5JDEwJHBmaW1MUmtlSkwvMVJjVzZLb2UwdXVqb0IweFpoNGhRVlUzdURDUmRrcXFRaDFqbEFBUWFHCg==
38+
kind: Secret
39+
metadata:
40+
name: jumppods-auth
41+
namespace: jumppods
42+
type: Opaque
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
repositories:
3+
- name: devopscorner-lab
4+
url: s3://devopscorner-helm-chart/lab
5+
6+
templates:
7+
default: &default
8+
namespace: devops-tools
9+
version: "1.2.0-rc"
10+
11+
releases:
12+
- name: jumppod
13+
chart: devopscorner-lab/api
14+
values:
15+
- ./jumppod-values-basic-auth.yml
16+
<<: *default
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
replicaCount: 1
2+
3+
secret:
4+
enabled: false
5+
6+
configMap:
7+
enabled: true
8+
name: "jumppod-api"
9+
mountPath: /app/core/config
10+
readOnly: true
11+
data:
12+
.app.config.json : |-
13+
{
14+
"AppName": "Commons Service",
15+
"GRPCTimeout": 10,
16+
"CacheExpiry": 300,
17+
"CacheCleanup": 600,
18+
"DefaultPageLimit": 3,
19+
"ClientTimeout": 10
20+
}
21+
22+
image:
23+
repository: devopscorner/cicd
24+
pullPolicy: Always
25+
tag: "alpine"
26+
27+
imagePullSecrets: []
28+
nameOverride: ""
29+
fullnameOverride: ""
30+
31+
serviceAccount:
32+
create: true
33+
annotations: {}
34+
name: jumppod
35+
namespace: devops-tools
36+
37+
service:
38+
type: ClusterIP
39+
ports:
40+
- name: http
41+
port: 80
42+
targetPort: 80
43+
protocol: TCP
44+
- name: ssh
45+
port: 2222
46+
targetPort: 22
47+
protocol: TCP
48+
49+
containers:
50+
ports:
51+
- name: http
52+
containerPort: 80
53+
protocol: TCP
54+
- name: ssh
55+
containerPort: 22
56+
protocol: TCP
57+
58+
ingress:
59+
enabled: true
60+
annotations:
61+
nginx.ingress.kubernetes.io/cors-allow-headers: '*'
62+
nginx.ingress.kubernetes.io/cors-allow-methods: '*'
63+
nginx.ingress.kubernetes.io/cors-allow-origin: '*'
64+
nginx.ingress.kubernetes.io/enable-cors: "true"
65+
nginx.ingress.kubernetes.io/affinity: cookie
66+
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
67+
kubernetes.io/ingress.class: nginx
68+
ingress.kubernetes.io/whitelist-source-range: 10.0.0.0/32
69+
# type of authentication
70+
nginx.ingress.kubernetes.io/auth-type: basic
71+
# name of the secret that contains the user/password definitions
72+
nginx.ingress.kubernetes.io/auth-secret: jumppods-auth
73+
# message to display with an appropriate context why the authentication is required
74+
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Jumppods'
75+
hosts:
76+
- host: jumppods.awscb.id
77+
http:
78+
paths:
79+
- path: /
80+
backend:
81+
serviceName: jumppod-api
82+
servicePort: 80
83+
tls: []
84+
85+
application:
86+
enabled: true
87+
env:
88+
- name: HELM_TEMPLATE_NAME
89+
value: api
90+
91+
resources:
92+
limits:
93+
cpu: 200m
94+
memory: 200Mi
95+
requests:
96+
cpu: 140m
97+
memory: 170Mi
98+
99+
autoscaling:
100+
enabled: true
101+
minReplicas: 1
102+
maxReplicas: 5
103+
targetCPUUtilizationPercentage: 80
104+
targetMemoryUtilizationPercentage: 80
105+
106+
nodeSelector:
107+
enabled: true
108+
select:
109+
node: "devopscorner-tools" # DEV/UAT Cluster
110+
111+
tolerations: []
112+
113+
affinity: {}
114+
115+
podAnnotations: {}
116+
117+
podSecurityContext: {}
118+
119+
securityContext: {}

helmfile/jumppod-values.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ autoscaling:
8989
nodeSelector:
9090
enabled: true
9191
select:
92-
node: "devops-tools" # DEV/UAT Cluster
92+
node: "devopscorner-tools" # DEV/UAT Cluster
9393

9494
tolerations: []
9595

helmfile/jumppods-auth.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
data:
3+
auth: anVtcHBvZHMtYWRtaW46JDJ5JDEwJHBmaW1MUmtlSkwvMVJjVzZLb2UwdXVqb0IweFpoNGhRVlUzdURDUmRrcXFRaDFqbEFBUWFHCg==
4+
kind: Secret
5+
metadata:
6+
name: jumppods-auth
7+
namespace: jumppods
8+
type: Opaque

0 commit comments

Comments
 (0)