Compare commits
	
		
			2 Commits
		
	
	
		
			main
			...
			7440c315ec
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						7440c315ec
	
				 | 
					
					
						|||
| 
						
						
							
						
						aca650e910
	
				 | 
					
					
						
@@ -4,29 +4,11 @@ alloy:
 | 
			
		||||
      content: |-
 | 
			
		||||
        loki.write "default" {
 | 
			
		||||
          endpoint {
 | 
			
		||||
            url = "http://loki-gateway.loki.svc.cluster.local/loki/api/v1/push"
 | 
			
		||||
            url = "http://loki.loki.svc.cluster.local:3100/loki/api/v1/push"
 | 
			
		||||
            tenant_id = "luna"
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // local.file_match discovers files on the local filesystem using glob patterns and the doublestar library. It returns an array of file paths.
 | 
			
		||||
        local.file_match "node_logs" {
 | 
			
		||||
          path_targets = [{
 | 
			
		||||
              // Monitor syslog to scrape node-logs
 | 
			
		||||
              __path__  = "/var/log/messages",
 | 
			
		||||
              job       = "node/syslog",
 | 
			
		||||
              node_name = sys.env("HOSTNAME"),
 | 
			
		||||
              cluster   = "development",
 | 
			
		||||
          }]
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // loki.source.file reads log entries from files and forwards them to other loki.* components.
 | 
			
		||||
        // You can specify multiple loki.source.file components by giving them different labels.
 | 
			
		||||
        loki.source.file "node_logs" {
 | 
			
		||||
          targets    = local.file_match.node_logs.targets
 | 
			
		||||
          forward_to = [loki.write.default.receiver]
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // discovery.kubernetes allows you to find scrape targets from Kubernetes resources.
 | 
			
		||||
        // It watches cluster state and ensures targets are continually synced with what is currently running in your cluster.
 | 
			
		||||
        discovery.kubernetes "pod" {
 | 
			
		||||
@@ -113,31 +95,3 @@ alloy:
 | 
			
		||||
 | 
			
		||||
          forward_to = [loki.write.default.receiver]
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // loki.source.kubernetes_events tails events from the Kubernetes API and converts them
 | 
			
		||||
        // into log lines to forward to other Loki components.
 | 
			
		||||
        loki.source.kubernetes_events "cluster_events" {
 | 
			
		||||
          job_name   = "integrations/kubernetes/eventhandler"
 | 
			
		||||
          log_format = "logfmt"
 | 
			
		||||
          forward_to = [
 | 
			
		||||
            loki.process.cluster_events.receiver,
 | 
			
		||||
          ]
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // loki.process receives log entries from other loki components, applies one or more processing stages,
 | 
			
		||||
        // and forwards the results to the list of receivers in the component's arguments.
 | 
			
		||||
        loki.process "cluster_events" {
 | 
			
		||||
          forward_to = [loki.write.default.receiver]
 | 
			
		||||
 | 
			
		||||
          stage.static_labels {
 | 
			
		||||
            values = {
 | 
			
		||||
              cluster = "development",
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          stage.labels {
 | 
			
		||||
            values = {
 | 
			
		||||
              kubernetes_cluster_events = "job",
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -38,4 +38,3 @@ spec:
 | 
			
		||||
          selfHeal: true
 | 
			
		||||
        syncOptions:
 | 
			
		||||
          - CreateNamespace=true
 | 
			
		||||
          - ServerSideApply=true
 | 
			
		||||
 
 | 
			
		||||
@@ -6,4 +6,3 @@ metadata:
 | 
			
		||||
  namespace: kubernaut
 | 
			
		||||
data:
 | 
			
		||||
  KUBERNAUT_CAT: kilwin
 | 
			
		||||
  WEB_CONCURRENCY: "4"
 | 
			
		||||
 
 | 
			
		||||
@@ -18,7 +18,7 @@ spec:
 | 
			
		||||
    spec:
 | 
			
		||||
      containers:
 | 
			
		||||
        - name: kubernaut
 | 
			
		||||
          image: git.kill0.net/ryanc/kubernaut:0.2.5
 | 
			
		||||
          image: git.kill0.net/ryanc/kubernaut:0.2.4
 | 
			
		||||
          imagePullPolicy: IfNotPresent
 | 
			
		||||
          ports:
 | 
			
		||||
            - name: sinatra-web
 | 
			
		||||
@@ -51,3 +51,10 @@ spec:
 | 
			
		||||
              port: 4567
 | 
			
		||||
            initialDelaySeconds: 5
 | 
			
		||||
            periodSeconds: 5
 | 
			
		||||
          resources:
 | 
			
		||||
            requests:
 | 
			
		||||
              memory: 64Mi
 | 
			
		||||
              cpu: 100m
 | 
			
		||||
            limits:
 | 
			
		||||
              memory: 128Mi
 | 
			
		||||
              cpu: 200m
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user