Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network Costs DaemonSet NodeSelector #806

Merged
merged 1 commit into from
Mar 8, 2021

Conversation

mbolt35
Copy link
Contributor

@mbolt35 mbolt35 commented Mar 8, 2021

No description provided.

@AjayTripathy
Copy link
Contributor

lgtm, could you add a note about the testing done @mbolt35 ? it's sufficient to just paste the output of helm template with the values changed and make sure it runs and the output is sane.

@mbolt35
Copy link
Contributor Author

mbolt35 commented Mar 8, 2021

Updated values.yaml nodeSelector in networkCosts node like so:

  nodeSelector: 
    ssd: "true"

Ran:

helm template --name=kubecost --namespace=kubecost ./cost-analyzer -f ./cost-analyzer/values.yaml -f ./cost-analyzer/values-thanos.yaml --set networkCosts.enabled=true > k.yaml

Observed the output for network-costs in k.yaml

---
# Source: cost-analyzer/templates/cost-analyzer-network-costs-template.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: kubecost-network-costs
  labels:
    app.kubernetes.io/name: cost-analyzer
    helm.sh/chart: cost-analyzer-1.75.1
    app.kubernetes.io/instance: kubecost
    app.kubernetes.io/managed-by: Tiller
    app: cost-analyzer
spec:
  updateStrategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app: kubecost-network-costs
  template:
    metadata:
      labels:
        app: kubecost-network-costs
    spec:
      hostNetwork: true
      serviceAccountName: kubecost-cost-analyzer
      containers:
      - name: kubecost-network-costs
        image: gcr.io/kubecost1/kubecost-network-costs:v15.0
        imagePullPolicy: Always
        env:
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        - name: HOST_PORT
          value: "3001"
        - name: TRAFFIC_LOGGING_ENABLED
          value: "true"
        - name: GODEBUG
          value: "madvdontneed=1"
        volumeMounts:
        - mountPath: /net
          name: nf-conntrack
        - mountPath: /netfilter
          name: netfilter
        - mountPath: /network-costs/config
          name: network-costs-config
        securityContext:
          privileged: true
        ports:
        - name: http-server
          containerPort: 3001
          hostPort: 3001
      nodeSelector:
          ssd: "true"
          
      volumes:
      - name: network-costs-config
        configMap:
          name: network-costs-config
      - name: nf-conntrack
        hostPath:
          path: /proc/net
      - name: netfilter
        hostPath:
          path: /proc/sys/net/netfilter

---

@AjayTripathy AjayTripathy merged commit ce79435 into develop Mar 8, 2021
@mbolt35 mbolt35 deleted the bolt/net-costs-node-selector branch March 8, 2021 21:43
@mbolt35 mbolt35 linked an issue Mar 8, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use a separate nodeselector for network-costs
2 participants