Skip to content

Commit

Permalink
...homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpbennett committed Jul 16, 2024
1 parent ff3e7b4 commit 09ca71c
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 35 deletions.
6 changes: 3 additions & 3 deletions kubernetes/apps/homepage-dashboard/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: homepage-cluster-role-binding
name: homepage
labels:
app.kubernetes.io/name: homepage
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: homepage-cluster-role
name: homepage
subjects:
- kind: ServiceAccount
name: homepage-serviceaccount
name: homepage
namespace: homepage-dashboard
2 changes: 1 addition & 1 deletion kubernetes/apps/homepage-dashboard/cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: homepage-cluster-role
name: homepage
labels:
app.kubernetes.io/name: homepage
rules:
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/apps/homepage-dashboard/config-map.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: homepage-configmap
name: homepage
namespace: homepage-dashboard
labels:
app.kubernetes.io/name: homepage
Expand Down
6 changes: 3 additions & 3 deletions kubernetes/apps/homepage-dashboard/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: homepage-deployment
name: homepage
namespace: homepage-dashboard
labels:
app.kubernetes.io/name: homepage
Expand All @@ -18,7 +18,7 @@ spec:
labels:
app.kubernetes.io/name: homepage
spec:
serviceAccountName: homepage-serviceaccount
serviceAccountName: homepage
automountServiceAccountToken: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
Expand Down Expand Up @@ -60,6 +60,6 @@ spec:
volumes:
- name: homepage-config
configMap:
name: homepage-configmap
name: homepage
- name: logs
emptyDir: {}
2 changes: 1 addition & 1 deletion kubernetes/apps/homepage-dashboard/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ spec:
pathType: Prefix
backend:
service:
name: homepage-svc
name: homepage
port:
number: 80
2 changes: 1 addition & 1 deletion kubernetes/apps/homepage-dashboard/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Secret
type: kubernetes.io/service-account-token
metadata:
name: homepage-secret
name: homepage
namespace: homepage-dashboard
labels:
app.kubernetes.io/name: homepage
Expand Down
4 changes: 2 additions & 2 deletions kubernetes/apps/homepage-dashboard/service-account.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: homepage-serviceaccount
name: homepage
namespace: homepage-dashboard
labels:
app.kubernetes.io/name: homepage
secrets:
- name: homepage-secret
- name: homepage
2 changes: 1 addition & 1 deletion kubernetes/apps/homepage-dashboard/service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: homepage-svc
name: homepage
namespace: homepage-dashboard
labels:
app.kubernetes.io/name: homepage
Expand Down
64 changes: 42 additions & 22 deletions kubernetes/apps/monitoring/promtail/config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,49 @@ data:
promtail.yaml: |
server:
http_listen_port: 9080
grpc_listen_port: 9095
positions:
filename: /var/log/positions.yaml
grpc_listen_port: 0
clients:
- url: http://loki-svc:3100/loki/api/v1/push
- url: http://loki-svc:3100/loki/api/v1/push
positions:
filename: /tmp/positions.yaml
target_config:
sync_period: 10s
scrape_configs:
- job_name: kubernetes-pods
kubernetes_sd_configs:
- role: pod
relabel_configs:
- source_labels: [__meta_kubernetes_pod_label_name]
target_label: job
- source_labels: [__meta_kubernetes_namespace]
target_label: namespace
- source_labels: [__meta_kubernetes_pod_name]
target_label: pod
pipeline_stages:
- docker: {}
static_configs:
- targets: ['localhost']
labels:
job: kubernetes-pods
__path__: /var/log/pods/*/*/*.log
- job_name: pod-logs
kubernetes_sd_configs:
- role: pod
pipeline_stages:
- docker: {}
relabel_configs:
- source_labels:
- __meta_kubernetes_pod_node_name
target_label: __host__
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- action: replace
replacement: $1
separator: /
source_labels:
- __meta_kubernetes_namespace
- __meta_kubernetes_pod_name
target_label: job
- action: replace
source_labels:
- __meta_kubernetes_namespace
target_label: namespace
- action: replace
source_labels:
- __meta_kubernetes_pod_name
target_label: pod
- action: replace
source_labels:
- __meta_kubernetes_pod_container_name
target_label: container
- replacement: /var/log/pods/*$1/*.log
separator: /
source_labels:
- __meta_kubernetes_pod_uid
- __meta_kubernetes_pod_container_name
target_label: __path__

0 comments on commit 09ca71c

Please sign in to comment.