Skip to content

Commit

Permalink
Airgapped Docs Release (#232)
Browse files Browse the repository at this point in the history
* updates for airgapped-docs 0.1.7 (#229)

Signed-off-by: Adam Martin <[email protected]>

* Fix ipv issue by making ipv4 and ipv6 configurable & fix svc ports. (#228)

* Fix ipv issue by making ipv4 and ipv6 configurable & fix svc ports.

* Update chart version

* Add support for restricted PSA

* Update Chart.yaml

---------

Signed-off-by: Adam Martin <[email protected]>
Co-authored-by: Adam Martin <[email protected]>
  • Loading branch information
atoy3731 and amartin120 authored Oct 24, 2024
1 parent 02e149e commit 5a8ae2b
Show file tree
Hide file tree
Showing 7 changed files with 157 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ helm install <release-name> carbide-charts/<chart>

If you would like to do add the Carbide Helm Charts to the Rancher Manager Chart Catalog, so you are able to use the user interface to install them, please follow the steps in the [Rancher Manager Docs](https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/helm-charts-in-rancher).

## How to Use (Airgaped Environments)
## How to Use (Airgapped Environments)

### For Helm Chart Repositories

Expand Down
2 changes: 1 addition & 1 deletion charts/airgapped-docs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ name: airgapped-docs
description: Rancher Government Airgapped Docs
icon: https://raw.githubusercontent.com/rancherfederal/carbide-docs/main/static/img/carbide-logo.svg
type: application
version: 0.1.52
version: 0.1.7
appVersion: "0.1.7"
18 changes: 18 additions & 0 deletions charts/airgapped-docs/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,27 @@ spec:
imagePullPolicy: Always
securityContext:
runAsUser: {{ $value.uid | default .Values.defaults.uid }}
runAsNonRoot: true
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
seccompProfile:
type: RuntimeDefault
ports:
- name: http
containerPort: {{ $value.containerPort | default .Values.defaults.containerPort }}
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
volumes:
- name: nginx-config
configMap:
{{- if $value.useHtmlBase }}
name: nginx-html-config
{{- else }}
name: nginx-config
{{- end }}
{{- end }}
{{- end -}}
{{- end }}
28 changes: 14 additions & 14 deletions charts/airgapped-docs/templates/navlink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
toService:
name: rancher-offline-docs
namespace: "{{ .Release.Namespace }}"
port: "80"
port: "8080"
scheme: http
{{- end }}
{{- if .Values.docs.elemental.enabled }}
Expand All @@ -49,7 +49,7 @@ spec:
toService:
name: elemental-offline-docs
namespace: "{{ .Release.Namespace }}"
port: "80"
port: "8080"
scheme: http
{{- end }}
{{- if .Values.docs.longhorn.enabled }}
Expand All @@ -76,7 +76,7 @@ spec:
toService:
name: longhorn-offline-docs
namespace: "{{ .Release.Namespace }}"
port: "80"
port: "8080"
scheme: http
{{- end }}
{{- if .Values.docs.k3s.enabled }}
Expand All @@ -103,7 +103,7 @@ spec:
toService:
name: k3s-offline-docs
namespace: "{{ .Release.Namespace }}"
port: "80"
port: "8080"
scheme: http
{{- end }}
{{- if .Values.docs.rke2.enabled }}
Expand All @@ -130,7 +130,7 @@ spec:
toService:
name: rke2-offline-docs
namespace: "{{ .Release.Namespace }}"
port: "80"
port: "8080"
scheme: http
{{- end }}
{{- if .Values.docs.carbide.enabled }}
Expand All @@ -157,7 +157,7 @@ spec:
toService:
name: carbide-offline-docs
namespace: {{ .Release.Namespace }}
port: "80"
port: "8080"
scheme: http
{{- end }}
{{- if .Values.docs.kubewarden.enabled }}
Expand Down Expand Up @@ -185,7 +185,7 @@ spec:
toService:
name: kubewarden-offline-docs
namespace: "{{ .Release.Namespace }}"
port: "80"
port: "8080"
scheme: http

{{- end }}
Expand All @@ -207,7 +207,7 @@ spec:
toService:
name: neuvector-offline-docs
namespace: "{{ .Release.Namespace }}"
port: "80"
port: "8080"
scheme: http
{{- end }}
{{- if .Values.docs.fleet.enabled }}
Expand All @@ -227,7 +227,7 @@ spec:
toService:
name: fleet-offline-docs
namespace: "{{ .Release.Namespace }}"
port: "80"
port: "8080"
scheme: http

{{- end }}
Expand All @@ -248,7 +248,7 @@ spec:
toService:
name: harvester-offline-docs
namespace: "{{ .Release.Namespace }}"
port: "80"
port: "8080"
scheme: http
{{- end }}
{{- if .Values.docs.kubernetes.enabled }}
Expand All @@ -269,7 +269,7 @@ spec:
toService:
name: kubernetes-offline-docs
namespace: "{{ .Release.Namespace }}"
port: "80"
port: "8080"
scheme: http
{{- end }}
{{- if .Values.docs.rancherdesktop.enabled }}
Expand All @@ -290,7 +290,7 @@ spec:
toService:
name: rancherdesktop-offline-docs
namespace: "{{ .Release.Namespace }}"
port: "80"
port: "8080"
scheme: http
{{- end }}
{{- if .Values.docs.hauler.enabled }}
Expand All @@ -311,7 +311,7 @@ spec:
toService:
name: hauler-offline-docs
namespace: "{{ .Release.Namespace }}"
port: "80"
port: "8080"
scheme: http
{{- end }}
{{- if .Values.docs.hauler.enabled }}
Expand All @@ -332,6 +332,6 @@ spec:
toService:
name: neuvector-vdb-explorer-offline-docs
namespace: "{{ .Release.Namespace }}"
port: "80"
port: "8080"
scheme: http
{{- end }}
112 changes: 112 additions & 0 deletions charts/airgapped-docs/templates/nginx-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-config
data:
nginx.conf: |
worker_processes auto;
error_log /dev/stdout debug;
pid /run/nginx/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/stdout;
sendfile on;
keepalive_timeout 65;
server {
{{- if .Values.global.ipv4.enabled }}
listen 8080;
{{- end }}
{{- if .Values.global.ipv6.enabled }}
listen [::]:8080;
{{- end }}
server_name localhost;
port_in_redirect off;
root /var/lib/nginx/html;
location / {
try_files $uri $uri/ @htmlext;
}
location ~ \.html$ {
try_files $uri =404;
}
location @htmlext {
rewrite ^(.*)$ $1.html last;
}
}
}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-html-config
data:
nginx.conf: |
worker_processes auto;
error_log /dev/stdout info;
pid /run/nginx/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/stdout;
sendfile on;
keepalive_timeout 65;
server {
{{- if .Values.global.ipv4.enabled }}
listen 8080;
{{- end }}
{{- if .Values.global.ipv6.enabled }}
listen [::]:8080;
{{- end }}
server_name localhost;
port_in_redirect off;
root /var/lib/nginx/html;
rewrite ^/(.*)/$ /$1.html permanent;
location / {
rewrite ^/(.*)/$ /$1 permanent;
try_files $uri $uri/ @htmlext;
}
location ~ \.html$ {
try_files $uri =404;
}
location @htmlext {
rewrite ^(.*)$ $1.html last;
}
}
}
2 changes: 1 addition & 1 deletion charts/airgapped-docs/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
spec:
ports:
- name: http
port: 80
port: 8080
protocol: TCP
targetPort: http
selector:
Expand Down
10 changes: 10 additions & 0 deletions charts/airgapped-docs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
global:
cattle:
systemDefaultRegistry: "rgcrprod.azurecr.us"
ipv4:
enabled: true
ipv6:
enabled: true

defaults:
containerPort: 8080
uid: 65532
Expand All @@ -17,16 +22,19 @@ docs:
# tag: "0.1.x"
rancher:
enabled: true
useHtmlBase: true
image:
name: "carbide/rancher-docs"
# tag: "0.1.x"
rke2:
enabled: true
useHtmlBase: true
image:
name: "carbide/rke2-docs"
# tag: "0.1.x"
k3s:
enabled: true
useHtmlBase: true
image:
name: "carbide/k3s-docs"
# tag: "0.1.x"
Expand All @@ -37,6 +45,7 @@ docs:
# tag: "0.1.x"
fleet:
enabled: true
useHtmlBase: true
image:
name: "carbide/fleet-docs"
# tag: "0.1.x"
Expand All @@ -62,6 +71,7 @@ docs:
# tag: "0.1.x"
harvester:
enabled: true
useHtmlBase: true
image:
name: "carbide/harvester-docs"
# tag: "0.1.x"
Expand Down

0 comments on commit 5a8ae2b

Please sign in to comment.