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

kimup-controller canot start error CrashLoopBackOff #100

Closed
dmicheneau opened this issue Nov 5, 2024 · 1 comment · Fixed by #110
Closed

kimup-controller canot start error CrashLoopBackOff #100

dmicheneau opened this issue Nov 5, 2024 · 1 comment · Fixed by #110
Assignees

Comments

@dmicheneau
Copy link
Member

dmicheneau commented Nov 5, 2024

Problem and confusion with port attribute, we need to change the port by an address attribute.

start with wrong heatz-port and wrong metrics-port

{"level":"info","msg":"Starting kimup0.1.0","time":"2024-11-05T14:40:33Z","version":"0.1.0"}
{"level":"info","msg":"Starting server health on :8080","time":"2024-11-05T14:40:33Z"}
{"level":"info","msg":"Starting server metrics on :8080","time":"2024-11-05T14:40:33Z"}

INFO 2024/11/05 14:41:11 scheduler.go:403: Closing the StdScheduler.
{"level":"info","msg":"Shutting down server on :8080","time":"2024-11-05T14:41:11Z"}
{"level":"info","msg":"Shutting down server on :8080","time":"2024-11-05T14:41:11Z"}
{"level":"info","msg":"Waiting for all server to shutdown gracefully...","time":"2024-11-05T14:41:11Z"}
{"level":"info","msg":"All Server on has been shutdown: bye...","time":"2024-11-05T14:41:11Z"}

Wrong manifest deployment for kimup-controller

apiVersion: apps/v1
kind: Deployment
...
spec:
      containers:
      - args:
        - --healthz
        - --healthz-port=0
        - --healthz-path=/healthz
        - --metrics
        - --metrics-port=0
        - --metrics-path=/metrics
        - --loglevel=info
...

The deployment start with the wrong default port

@dmicheneau dmicheneau changed the title kimup-controller canot start kimup-controller canot start error CrashLoopBackOff Nov 5, 2024
@dmicheneau
Copy link
Member Author

force the port in the kimup crd

kind: Kimup
metadata:
  labels:
    app.kubernetes.io/name: kube-image-updater
  name: kimup
  namespace: kimup-operator
spec:
  name: demo
  logLevel: info
  image: ghcr.io/orange-cloudavenue/kimup-controller:v0.1.0
  healtz:
    port: 9081
  metrics:
    port: 9080

Same result: CrashLoopBackOff

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
  creationTimestamp: "2024-11-05T14:48:28Z"
  generation: 12
  labels:
    app: kimup-controller
    app.kubernetes.io/component: kimup-controller
    app.kubernetes.io/instance: kimup-controller
    app.kubernetes.io/managed-by: kimup-operator
    app.kubernetes.io/name: kimup-controller
    app.kubernetes.io/part-of: kimup-controller
    app.kubernetes.io/version: dev
  name: kimup-controller
  namespace: kimup-operator
  ownerReferences:
  - apiVersion: kimup.cloudavenue.io/v1alpha1
    kind: Kimup
    name: kimup
    uid: 0f19f9ca-3f1d-4c4a-a36c-9f36bf967133
  resourceVersion: "516708"
  uid: 5a018297-e3a0-445a-82cf-969798b1f195
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: kimup-controller
      app.kubernetes.io/name: kimup-controller
      app.kubernetes.io/part-of: kimup-controller
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: kimup-controller
        app.kubernetes.io/name: kimup-controller
        app.kubernetes.io/part-of: kimup-controller
    spec:
      containers:
      - args:
        - --healthz
        - --healthz-port=9081
        - --healthz-path=/healthz
        - --metrics
        - --metrics-port=9080
        - --metrics-path=/metrics
        - --loglevel=info
        image: ghcr.io/orange-cloudavenue/kimup-controller:v0.1.0
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /healthz
            port: 9081
            scheme: HTTP
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 2
        name: kimup
        ports:
        - containerPort: 9080
          name: metrics
          protocol: TCP
        - containerPort: 9081
          name: healthz
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /healthz
            port: 9081
            scheme: HTTP
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 2
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: kimup
      serviceAccountName: kimup
      terminationGracePeriodSeconds: 30
status:
  conditions:
  - lastTransitionTime: "2024-11-05T14:48:28Z"
    lastUpdateTime: "2024-11-05T14:48:28Z"
    message: Deployment does not have minimum availability.
    reason: MinimumReplicasUnavailable
    status: "False"
    type: Available
  - lastTransitionTime: "2024-11-05T14:48:28Z"
    lastUpdateTime: "2024-11-05T14:48:28Z"
    message: ReplicaSet "kimup-controller-7467b559f9" is progressing.
    reason: ReplicaSetUpdated
    status: "True"
    type: Progressing
  observedGeneration: 12
  replicas: 1
  unavailableReplicas: 1
  updatedReplicas: 1

@azrod azrod self-assigned this Nov 6, 2024
@azrod azrod linked a pull request Nov 6, 2024 that will close this issue
@azrod azrod closed this as completed in #110 Nov 6, 2024
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 a pull request may close this issue.

2 participants