treewide: Format with shellcheck, jsonlint and yamllint
This commit is contained in:
+29
-22
@@ -6,39 +6,46 @@ let
|
||||
values = lib.apps.appValues {
|
||||
inherit env;
|
||||
base = ../values/atlantis;
|
||||
extraValues = {};
|
||||
extraValues = { };
|
||||
};
|
||||
|
||||
kustomize = r:
|
||||
kustomize =
|
||||
r:
|
||||
if r.kind == "Deployment" then
|
||||
lib.attrsets.recursiveUpdate r {
|
||||
spec.template.spec.containers =
|
||||
builtins.map (x:
|
||||
x // {
|
||||
spec.template.spec.containers = builtins.map (
|
||||
x:
|
||||
x
|
||||
// {
|
||||
livenessProbe.httpGet.path = "/healthz";
|
||||
readinessProble.httpGet.path = "/healthz";
|
||||
env = x.env ++ [ { name = "INERNAL_PORT"; value = 8000; } ];
|
||||
}) r.spec.template.spec.containers;
|
||||
env = x.env ++ [
|
||||
{
|
||||
name = "INERNAL_PORT";
|
||||
value = 8000;
|
||||
}
|
||||
];
|
||||
}
|
||||
) r.spec.template.spec.containers;
|
||||
}
|
||||
else if r.kind == "Service" then
|
||||
{}
|
||||
else r;
|
||||
else if r.kind == "Service" then
|
||||
{ }
|
||||
else
|
||||
r;
|
||||
in
|
||||
{
|
||||
options.apps.atlantis = lib.apps.appOptions {
|
||||
revision = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "main";
|
||||
description = "Revision";
|
||||
};
|
||||
revision = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "main";
|
||||
description = "Revision";
|
||||
};
|
||||
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = if env == "prod"
|
||||
then "maps.oceanbox.io"
|
||||
else "atlantis.beta.oceanbox.io";
|
||||
description = "Revision";
|
||||
};
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = if env == "prod" then "maps.oceanbox.io" else "atlantis.beta.oceanbox.io";
|
||||
description = "Revision";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.apps.appConfig cfg "${env}-atlantis" {
|
||||
|
||||
+23
-25
@@ -6,34 +6,32 @@ let
|
||||
values = lib.apps.appValues {
|
||||
inherit env;
|
||||
base = ../values/openfga;
|
||||
extraValues = {};
|
||||
extraValues = { };
|
||||
};
|
||||
|
||||
kustomize = r:
|
||||
if r.kind == "Job" then
|
||||
lib.attrsets.recursiveUpdate r { spec.backoffLimit = 2; }
|
||||
else r;
|
||||
kustomize =
|
||||
r: if r.kind == "Job" then lib.attrsets.recursiveUpdate r { spec.backoffLimit = 2; } else r;
|
||||
|
||||
in
|
||||
{
|
||||
options.apps.openfga = lib.apps.appOptions {};
|
||||
{
|
||||
options.apps.openfga = lib.apps.appOptions { };
|
||||
|
||||
config = lib.apps.appConfig cfg "${env}-openfga" {
|
||||
helm.releases."${env}-openfga" = {
|
||||
inherit values;
|
||||
chart = lib.helm.downloadHelmChart {
|
||||
repo = "https://openfga.github.io/helm-charts";
|
||||
chart = "openfga";
|
||||
version = "0.2.12";
|
||||
chartHash = "sha256-7yLcw9/oNPvCePrtTJwKAG88t0Ym5Dl/S83Gz+gQdDU=";
|
||||
};
|
||||
transformer = rs: builtins.map (x: kustomize x) rs;
|
||||
};
|
||||
|
||||
annotations = {};
|
||||
resources = {
|
||||
services.poop.spec = {
|
||||
};
|
||||
};
|
||||
config = lib.apps.appConfig cfg "${env}-openfga" {
|
||||
helm.releases."${env}-openfga" = {
|
||||
inherit values;
|
||||
chart = lib.helm.downloadHelmChart {
|
||||
repo = "https://openfga.github.io/helm-charts";
|
||||
chart = "openfga";
|
||||
version = "0.2.12";
|
||||
chartHash = "sha256-7yLcw9/oNPvCePrtTJwKAG88t0Ym5Dl/S83Gz+gQdDU=";
|
||||
};
|
||||
}
|
||||
transformer = rs: builtins.map (x: kustomize x) rs;
|
||||
};
|
||||
|
||||
annotations = { };
|
||||
resources = {
|
||||
services.poop.spec = {
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -46,19 +46,19 @@ spec:
|
||||
{{ end }}
|
||||
cleanupController:
|
||||
resources:
|
||||
limits:
|
||||
limits:
|
||||
memory: {{ .Values.kyverno.resources.cleanupController.memory }}
|
||||
requests:
|
||||
memory: {{ .Values.kyverno.resources.cleanupController.memory }}
|
||||
reportsController:
|
||||
resources:
|
||||
limits:
|
||||
limits:
|
||||
memory: {{ .Values.kyverno.resources.reportsController.memory }}
|
||||
requests:
|
||||
memory: {{ .Values.kyverno.resources.reportsController.memory }}
|
||||
backgroundController:
|
||||
resources:
|
||||
limits:
|
||||
limits:
|
||||
memory: {{ .Values.kyverno.resources.backgroundController.memory }}
|
||||
requests:
|
||||
memory: {{ .Values.kyverno.resources.backgroundController.memory }}
|
||||
|
||||
@@ -27,17 +27,17 @@ spec:
|
||||
scheme: {{ .Values.linkerd.secretScheme }}
|
||||
{{- if .Values.linkerd.identityIssuerPEM }}
|
||||
tls:
|
||||
crtPEM: {{- .Values.linkerd.identityIssuerPEM | toYaml | indent 14 }}
|
||||
crtPEM: {{- .Values.linkerd.identityIssuerPEM | toYaml | indent 14 }}
|
||||
{{- end }}
|
||||
policyValidator:
|
||||
externalSecret: true
|
||||
caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }}
|
||||
caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }}
|
||||
proxyInjector:
|
||||
externalSecret: true
|
||||
caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }}
|
||||
caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }}
|
||||
profileValidator:
|
||||
externalSecret: true
|
||||
caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }}
|
||||
caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }}
|
||||
|
||||
project: sys
|
||||
syncPolicy:
|
||||
|
||||
@@ -16,7 +16,7 @@ spec:
|
||||
helm:
|
||||
values: |
|
||||
containerPort: 10250
|
||||
resources:
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 200Mi
|
||||
|
||||
@@ -53,7 +53,7 @@ spec:
|
||||
endpoint: "tempo.tempo.svc:4317"
|
||||
tls:
|
||||
insecure: true
|
||||
##
|
||||
##
|
||||
otlphttp/metrics:
|
||||
endpoint: http://prom-prometheus.prometheus:9090/api/v1/otlp
|
||||
tls:
|
||||
|
||||
@@ -12,8 +12,8 @@ metadata:
|
||||
policies.kyverno.io/minversion: 1.7.0
|
||||
kyverno.io/kubernetes-version: "1.23"
|
||||
policies.kyverno.io/description: >-
|
||||
Customers should not have full admin permissions on their own namespaces.
|
||||
This policy will generate a RoleBinding, binding their group_id to
|
||||
Customers should not have full admin permissions on their own namespaces.
|
||||
This policy will generate a RoleBinding, binding their group_id to
|
||||
the Cluster-Admin clusterrole. This will still only apply to the namespace as
|
||||
the resource is a rolebinding, not clusterrolebinding.
|
||||
This policy should not trigger on any namespaces with label component=sys
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
grafana_folder: Prometheus-stack
|
||||
targets:
|
||||
- apiVersion: v1
|
||||
kind: ConfigMap
|
||||
kind: ConfigMap
|
||||
name: "{{`{{ request.object.metadata.name }}`}}"
|
||||
name: generate-dashboard-folder-annotation
|
||||
skipBackgroundRequests: true
|
||||
|
||||
@@ -13,7 +13,7 @@ metadata:
|
||||
is time consuming and error prone. This policy will copy a
|
||||
Secret called `regcred` which exists in the `default` Namespace to
|
||||
new Namespaces when they are created. It will also push updates to
|
||||
the copied Secrets should the source Secret be changed.
|
||||
the copied Secrets should the source Secret be changed.
|
||||
spec:
|
||||
rules:
|
||||
- name: sync-image-pull-secret
|
||||
|
||||
@@ -9,12 +9,12 @@ metadata:
|
||||
policies.kyverno.io/severity: medium
|
||||
policies.kyverno.io/subject: Ingress
|
||||
policies.kyverno.io/description: >-
|
||||
Ingresses with the label "internal=true" should be whitelisted.
|
||||
If no whitelist exists, add the default values, otherwise append
|
||||
Ingresses with the label "internal=true" should be whitelisted.
|
||||
If no whitelist exists, add the default values, otherwise append
|
||||
whitelist to the already existing ones
|
||||
spec:
|
||||
mutateExistingOnPolicyUpdate: false
|
||||
#precondition: has whitelist annotation or
|
||||
#precondition: has whitelist annotation or
|
||||
rules:
|
||||
- name: ensure-nginx-whitelist-exists
|
||||
match:
|
||||
|
||||
@@ -32,7 +32,7 @@ data:
|
||||
}
|
||||
],
|
||||
"__elements":{
|
||||
|
||||
|
||||
},
|
||||
"__requires":[
|
||||
{
|
||||
@@ -70,7 +70,7 @@ data:
|
||||
"limit":100,
|
||||
"matchAny":false,
|
||||
"tags":[
|
||||
|
||||
|
||||
],
|
||||
"type":"dashboard"
|
||||
},
|
||||
@@ -83,7 +83,7 @@ data:
|
||||
"graphTooltip":0,
|
||||
"id":null,
|
||||
"links":[
|
||||
|
||||
|
||||
],
|
||||
"liveNow":false,
|
||||
"panels":[
|
||||
@@ -130,7 +130,7 @@ data:
|
||||
}
|
||||
},
|
||||
"mappings":[
|
||||
|
||||
|
||||
],
|
||||
"thresholds":{
|
||||
"mode":"absolute",
|
||||
@@ -195,7 +195,7 @@ data:
|
||||
"options":{
|
||||
"legend":{
|
||||
"calcs":[
|
||||
|
||||
|
||||
],
|
||||
"displayMode":"list",
|
||||
"placement":"bottom",
|
||||
@@ -255,7 +255,7 @@ data:
|
||||
"multi":false,
|
||||
"name":"DS_PROMETHEUS",
|
||||
"options":[
|
||||
|
||||
|
||||
],
|
||||
"query":"prometheus",
|
||||
"refresh":1,
|
||||
@@ -266,7 +266,7 @@ data:
|
||||
},
|
||||
{
|
||||
"current":{
|
||||
|
||||
|
||||
},
|
||||
"datasource":{
|
||||
"type":"prometheus",
|
||||
@@ -279,7 +279,7 @@ data:
|
||||
"multi":false,
|
||||
"name":"namespace",
|
||||
"options":[
|
||||
|
||||
|
||||
],
|
||||
"query":{
|
||||
"query":"label_values(rabbitmq_identity_info, namespace)",
|
||||
@@ -296,7 +296,7 @@ data:
|
||||
},
|
||||
{
|
||||
"current":{
|
||||
|
||||
|
||||
},
|
||||
"datasource":{
|
||||
"type":"prometheus",
|
||||
@@ -309,7 +309,7 @@ data:
|
||||
"multi":false,
|
||||
"name":"rabbitmq_cluster",
|
||||
"options":[
|
||||
|
||||
|
||||
],
|
||||
"query":{
|
||||
"query":"label_values(rabbitmq_identity_info{namespace=\"$namespace\"}, rabbitmq_cluster)",
|
||||
@@ -326,7 +326,7 @@ data:
|
||||
},
|
||||
{
|
||||
"current":{
|
||||
|
||||
|
||||
},
|
||||
"datasource":{
|
||||
"type":"prometheus",
|
||||
@@ -339,7 +339,7 @@ data:
|
||||
"multi":false,
|
||||
"name":"queue",
|
||||
"options":[
|
||||
|
||||
|
||||
],
|
||||
"query":{
|
||||
"query":"query_result(rabbitmq_detailed_queue_messages{namespace=\"$namespace\"} * on (instance, job) group_left(rabbitmq_cluster) rabbitmq_identity_info{namespace=\"$namespace\", rabbitmq_cluster=\"$rabbitmq_cluster\"})",
|
||||
@@ -361,7 +361,7 @@ data:
|
||||
"to":"now"
|
||||
},
|
||||
"timepicker":{
|
||||
|
||||
|
||||
},
|
||||
"timezone":"",
|
||||
"title":"RabbitMQ-Queue",
|
||||
|
||||
@@ -37,7 +37,7 @@ rules:
|
||||
resources:
|
||||
- events
|
||||
verbs: ["*"]
|
||||
|
||||
|
||||
- nonResourceURLs: ["*"]
|
||||
verbs: ["*"]
|
||||
- apiGroups:
|
||||
|
||||
@@ -139,8 +139,8 @@ spec:
|
||||
resources: {}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
command:
|
||||
- "/bin/sh"
|
||||
command:
|
||||
- "/bin/sh"
|
||||
- -c
|
||||
- /tmp/renew-certs/renew-certs.sh
|
||||
volumeMounts:
|
||||
@@ -216,7 +216,7 @@ metadata:
|
||||
name: default-deny-egress
|
||||
namespace: cert-manager
|
||||
spec:
|
||||
podSelector:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
block-egress: "true"
|
||||
policyTypes:
|
||||
|
||||
@@ -42,8 +42,8 @@ spec:
|
||||
resources: {}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
command:
|
||||
- "/bin/sh"
|
||||
command:
|
||||
- "/bin/sh"
|
||||
- -c
|
||||
- /tmp/renew-certs/renew-certs.sh
|
||||
volumeMounts:
|
||||
@@ -119,7 +119,7 @@ metadata:
|
||||
name: default-deny-egress
|
||||
namespace: gitlab
|
||||
spec:
|
||||
podSelector:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
block-egress: "true"
|
||||
policyTypes:
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Oceanbox IdP
|
||||
# Oceanbox IdP
|
||||
|
||||
```
|
||||
npm install && npm start
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
server="root@fs1-0"
|
||||
path="/vol/brick0/nfs0/k1/pv-oceanbox-dex"
|
||||
dest="$server:$path"
|
||||
dest="${server}:${path}"
|
||||
|
||||
index=$(basename dist/assets/index-*.js)
|
||||
|
||||
ssh $server -- rm $path/static/js/*.js
|
||||
scp dist/assets/*.js $dest/static/js/
|
||||
ssh "${server}" -- rm "${path}"/static/js/*.js
|
||||
scp dist/assets/*.js "${dest}"/static/js/
|
||||
|
||||
sed -r "s/@index@/$index/" ./dex/templates/login.html > login.html.$$
|
||||
scp ./dex/templates/* $dest/templates/
|
||||
scp ./dex/static/*.* $dest/static/
|
||||
scp login.html.$$ $dest/templates/login.html
|
||||
sed -r "s/@index@/${index}/" ./dex/templates/login.html > login.html.$$
|
||||
scp ./dex/templates/* "${dest}"/templates/
|
||||
scp ./dex/static/*.* "${dest}"/static/
|
||||
scp login.html.$$ "${dest}"/templates/login.html
|
||||
rm login.html.$$
|
||||
ssh admin@k1-0.itpartner.intern -- kubectl rollout restart -n oceanbox deployment/dex
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -66,7 +66,7 @@ let MyApp() =
|
||||
if isNullOrUndefined localStorage["user_id"] then
|
||||
""
|
||||
else
|
||||
localStorage["user_id"]
|
||||
localStorage["user_id"]
|
||||
// Browser.Dom.document.cookie
|
||||
// |> fun s -> s.Split ';'
|
||||
// |> Array.filter (fun s -> s.StartsWith "user_id=")
|
||||
@@ -75,7 +75,7 @@ let MyApp() =
|
||||
// |> Option.defaultValue ""
|
||||
|
||||
let toggleAmnesia _ = setAmnesia (not amnesia)
|
||||
|
||||
|
||||
html $"""
|
||||
<div class="centering">
|
||||
<div @keydown={Ev(onEnter)}>
|
||||
|
||||
Reference in New Issue
Block a user