Skip to content

Commit

Permalink
chore(k8s): cue fmt -s
Browse files Browse the repository at this point in the history
cue fmt -s ./... is broken with 0.9, so instead:

	❯ find -type d -exec cue fmt -s {} +
  • Loading branch information
uhthomas committed Jul 26, 2024
1 parent 8114b95 commit 4a6d69f
Show file tree
Hide file tree
Showing 81 changed files with 251 additions and 240 deletions.
3 changes: 3 additions & 0 deletions cue.mod/module.cue
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
module: "github.com/uhthomas/automata"
language: {
version: "v0.9.2"
}
2 changes: 1 addition & 1 deletion k8s/amour/cert_manager/role_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import rbacv1 "k8s.io/api/rbac/v1"
}]
}

#RoleList: items: [ {
#RoleList: items: [{
metadata: {
name: "cert-manager-cainjector:leaderelection"
namespace: "kube-system"
Expand Down
3 changes: 1 addition & 2 deletions k8s/amour/cilium/daemon_set_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ import (
valueFrom: fieldRef: fieldPath: "spec.nodeName"
}, {
name: "CILIUM_K8S_NAMESPACE"
valueFrom: fieldRef:
fieldPath: "metadata.namespace"
valueFrom: fieldRef: fieldPath: "metadata.namespace"
}, {
name: "KUBERNETES_SERVICE_HOST"
value: "localhost"
Expand Down
2 changes: 1 addition & 1 deletion k8s/amour/cilium/hubble_relay/config_map_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
}

#ConfigMapList: items: [{
metadata: name: "hubble-relay-config"
metadata: name: "hubble-relay-config"
data: "config.yaml": yaml.Marshal({
"cluster-name": "default"
"peer-service": "hubble-peer.cilium.svc.cluster.local:443"
Expand Down
6 changes: 3 additions & 3 deletions k8s/amour/cilium/hubble_relay/deployment_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ import (
topologyKey: v1.#LabelHostname
}]
securityContext: {
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
fsGroup: 2000
fsGroupChangePolicy: v1.#FSGroupChangeOnRootMismatch
seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
Expand Down
2 changes: 1 addition & 1 deletion k8s/amour/cilium/hubble_relay/list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
#Namespace: "cilium"

// renovate: datasource=github-releases depName=cilium/cilium extractVersion=^v(?<version>.*)$
#Version: "1.15.0-rc.0"
#Version: "1.15.0-rc.0"

#List: v1.#List & {
apiVersion: "v1"
Expand Down
6 changes: 3 additions & 3 deletions k8s/amour/cilium/hubble_ui/deployment_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ import (
nodeSelector: (v1.#LabelOSStable): v1.#Linux
serviceAccountName: "hubble-ui"
securityContext: {
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
fsGroup: 2000
fsGroupChangePolicy: v1.#FSGroupChangeOnRootMismatch
seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
Expand Down
2 changes: 1 addition & 1 deletion k8s/amour/cilium/list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
#Namespace: #Name

// renovate: datasource=github-releases depName=cilium/cilium extractVersion=^v(?<version>.*)$
#Version: "1.15.0-rc.0"
#Version: "1.15.0-rc.0"

#List: v1.#List & {
apiVersion: "v1"
Expand Down
3 changes: 2 additions & 1 deletion k8s/amour/dcgm_exporter/daemon_set_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import (

imagePullPolicy: v1.#PullIfNotPresent
securityContext: capabilities: add: ["SYS_ADMIN"]
},
// securityContext: {
// capabilities: {
// add: ["SYS_ADMIN"]
Expand All @@ -73,7 +74,7 @@ import (
// readOnlyRootFilesystem: true
// allowPrivilegeEscalation: false
// }
}]
]
// securityContext: {
// runAsUser: 1000
// runAsGroup: 3000
Expand Down
6 changes: 3 additions & 3 deletions k8s/amour/emqx/stateful_set_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ import (
}
}]
securityContext: {
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: false
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: false
fsGroup: 2000
fsGroupChangePolicy: v1.#FSGroupChangeOnRootMismatch
seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
Expand Down
6 changes: 3 additions & 3 deletions k8s/amour/emqx_exporter/deployment_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ import (
}
}]
securityContext: {
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
fsGroup: 2000
fsGroupChangePolicy: v1.#FSGroupChangeOnRootMismatch
seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
Expand Down
3 changes: 2 additions & 1 deletion k8s/amour/external_dns/cluster_role_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ import (
resources: ["dnsendpoints/status"]
verbs: ["*"]
}]
},
// }, {
// apiGroups: ["gateway.networking.k8s.io"]
// resources: ["httproutes", "grpcroutes", "tlsroutes", "tcproutes", "udproutes"]
// verbs: ["get", "watch", "list"]
// }]
}]
]
6 changes: 3 additions & 3 deletions k8s/amour/external_secrets/deployment_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import (
}]
serviceAccountName: #Name
securityContext: {
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
fsGroup: 2000
fsGroupChangePolicy: v1.#FSGroupChangeOnRootMismatch
seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
Expand Down
6 changes: 3 additions & 3 deletions k8s/amour/external_secrets/webhook/deployment_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ import (
}]
serviceAccountName: #Name
securityContext: {
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
fsGroup: 2000
fsGroupChangePolicy: v1.#FSGroupChangeOnRootMismatch
seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
Expand Down
3 changes: 2 additions & 1 deletion k8s/amour/fluent_bit/daemon_set_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ import (
port: "http-metrics"
}
imagePullPolicy: v1.#PullIfNotPresent
},
// securityContext: {
// capabilities: drop: ["ALL"]
// readOnlyRootFilesystem: true
// allowPrivilegeEscalation: false
// }
}]
]
serviceAccountName: #Name
// securityContext: {
// runAsUser: 1000
Expand Down
6 changes: 3 additions & 3 deletions k8s/amour/frigate/stateful_set_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ import (
//
// https://github.com/linuxserver/docker-radarr/issues/203
securityContext: {
runAsUser: 0
runAsGroup: 0
runAsNonRoot: false
runAsUser: 0
runAsGroup: 0
runAsNonRoot: false
fsGroup: 2000
fsGroupChangePolicy: v1.#FSGroupChangeOnRootMismatch
seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
Expand Down
10 changes: 5 additions & 5 deletions k8s/amour/grafana/grafana_dashboard_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ import (
}

let dashboards = {
"General": [
General: [
// Node Exporter Full
// https://grafana.com/grafana/dashboards/1860
1860,
]
"Ceph": [
Ceph: [
"https://raw.githubusercontent.com/ceph/ceph/278d89538d248b92584c49442aef613cf0540c8a/monitoring/ceph-mixin/dashboards_out/ceph-cluster-advanced.json",
"https://raw.githubusercontent.com/ceph/ceph/278d89538d248b92584c49442aef613cf0540c8a/monitoring/ceph-mixin/dashboards_out/ceph-cluster.json",
"https://raw.githubusercontent.com/ceph/ceph/278d89538d248b92584c49442aef613cf0540c8a/monitoring/ceph-mixin/dashboards_out/cephfs-overview.json",
Expand Down Expand Up @@ -54,7 +54,7 @@ let dashboards = {
"https://raw.githubusercontent.com/emqx/emqx-exporter/5b8a4169266f215e4ffc70d95a915d8bcf8d860e/grafana-dashboard/template/emqx-5/rule-engine-count.json",
"https://raw.githubusercontent.com/emqx/emqx-exporter/5b8a4169266f215e4ffc70d95a915d8bcf8d860e/grafana-dashboard/template/emqx-5/rule-engine-rate.json",
]
"Kubernetes": [
Kubernetes: [
// Kubernetes / System / API Server
// https://grafana.com/grafana/dashboards/15761
15761,
Expand All @@ -80,8 +80,8 @@ let dashboards = {
// https://grafana.com/grafana/dashboards/19105
19105,
]
"VictoriaLogs": ["https://raw.githubusercontent.com/VictoriaMetrics/VictoriaMetrics/7b20de4674f9594ef17cbba7aa5c735c11788195/dashboards/victorialogs.json"]
"VictoriaMetrics": [
VictoriaLogs: ["https://raw.githubusercontent.com/VictoriaMetrics/VictoriaMetrics/7b20de4674f9594ef17cbba7aa5c735c11788195/dashboards/victorialogs.json"]
VictoriaMetrics: [
// VictoriaMetrics - single-node
// https://grafana.com/grafana/dashboards/10229
10229,
Expand Down
6 changes: 3 additions & 3 deletions k8s/amour/grafana_operator/deployment_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ import (
}]
serviceAccountName: #Name
securityContext: {
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
fsGroup: 2000
fsGroupChangePolicy: v1.#FSGroupChangeOnRootMismatch
seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
Expand Down
6 changes: 3 additions & 3 deletions k8s/amour/kube_state_metrics/stateful_set_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ import (
serviceAccountName: #Name
automountServiceAccountToken: true
securityContext: {
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
fsGroup: 2000
fsGroupChangePolicy: v1.#FSGroupChangeOnRootMismatch
seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
Expand Down
2 changes: 1 addition & 1 deletion k8s/amour/media/recyclarr/config_map_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ _#RecylarrConfig: {
#Include: {config: string} | {template: string}

#ReleaseProfile: {
trash_ids: [...#TrashID] & list.UniqueItems()
trash_ids: [...#TrashID] & list.UniqueItems()
strict_negative_scores?: bool | *false
tags?: [...string]
filter?: {
Expand Down
8 changes: 4 additions & 4 deletions k8s/amour/metrics_server/deployment_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import (
failureThreshold: 3
}

livenessProbe: probe & {httpGet: path: "/livez"}
livenessProbe: probe & {httpGet: path: "/livez"}
readinessProbe: probe & {
httpGet: path: "/readyz"
initialDelaySeconds: 20
Expand All @@ -74,9 +74,9 @@ import (
nodeSelector: (v1.#LabelOSStable): v1.#Linux
serviceAccountName: #Name
securityContext: {
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
fsGroup: 2000
fsGroupChangePolicy: v1.#FSGroupChangeOnRootMismatch
seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
Expand Down
25 changes: 14 additions & 11 deletions k8s/amour/minecraft/cf_atm9/stateful_set_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -97,26 +97,29 @@ import (
}, {
name: "PVP"
value: "false"
},
// }, {
// name: "VIEW_DISTANCE"
// value: "12"
}, {
name: "USE_SIMD_FLAGS"
value: "true"
}, {
name: "MEMORY"
value: ""
{
name: "USE_SIMD_FLAGS"
value: "true"
}, {
name: "MEMORY"
value: ""
},
// TODO:: Maybe calculate based
// on resourceFieldRef?
// value: "12G"
}, {
name: "JVM_XX_OPTS"
// https://www.reddit.com/r/feedthebeast/comments/5jhuk9/modded_mc_and_memory_usage_a_history_with_a/
value: "-XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75 -XX:+UseG1GC -Dsun.rmi.dgc.server.gcInterval=2147483646 -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M"
{
name: "JVM_XX_OPTS"
// https://www.reddit.com/r/feedthebeast/comments/5jhuk9/modded_mc_and_memory_usage_a_history_with_a/
value: "-XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75 -XX:+UseG1GC -Dsun.rmi.dgc.server.gcInterval=2147483646 -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M"
},
// }, {
// name: "USE_AIKAR_FLAGS"
// value: "true"
}]
]
resources: limits: {
(v1.#ResourceCPU): "4"
(v1.#ResourceMemory): "12Gi"
Expand Down
10 changes: 5 additions & 5 deletions k8s/amour/minecraft/vanilla/stateful_set_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ import (

let probe = {exec: command: ["mc-health"]}

livenessProbe: probe
readinessProbe: probe
livenessProbe: probe
readinessProbe: probe
startupProbe: probe & {initialDelaySeconds: 60}

imagePullPolicy: v1.#PullIfNotPresent
Expand All @@ -78,9 +78,9 @@ import (
}
}]
securityContext: {
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
fsGroup: 2000
fsGroupChangePolicy: v1.#FSGroupChangeOnRootMismatch
seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
Expand Down
6 changes: 3 additions & 3 deletions k8s/amour/node_exporter/daemon_set_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ import (
hostNetwork: true
hostPID: true
securityContext: {
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
fsGroup: 2000
fsGroupChangePolicy: v1.#FSGroupChangeOnRootMismatch
seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
Expand Down
6 changes: 3 additions & 3 deletions k8s/amour/node_feature_discovery/gc/deployment_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import (
}]
serviceAccountName: #Name
securityContext: {
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
fsGroup: 2000
fsGroupChangePolicy: v1.#FSGroupChangeOnRootMismatch
seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
Expand Down
6 changes: 3 additions & 3 deletions k8s/amour/node_feature_discovery/master/deployment_list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ import (
value: ""
}]
securityContext: {
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 3000
runAsNonRoot: true
fsGroup: 2000
fsGroupChangePolicy: v1.#FSGroupChangeOnRootMismatch
seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
Expand Down
2 changes: 1 addition & 1 deletion k8s/amour/node_feature_discovery/master/list.cue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
kind: "List"
items: [...{
metadata: {
name: #Name
name: #Name
labels: {
"app.kubernetes.io/name": #Name
"app.kubernetes.io/version": #Version
Expand Down
Loading

0 comments on commit 4a6d69f

Please sign in to comment.