'snipeit on kubernetes external ip not loading

i am trying to deploy snipe-it on k8s cluster (raspberry pi cluster)

i have running mysql on kubernetes

i want to deploy snipe-it application on kubernetes

my yaml file looks like this

apiVersion: v1
kind: ConfigMap
metadata:
  name: snipe-it-config
data:
  # Mysql Parameters
  MYSQL_PORT_3306_TCP_ADDR: "obscure address"
  MYSQL_PORT_3306_TCP_PORT: "3306"
  MYSQL_DATABASE: "snipeit"
  MYSQL_USER: "obscure"
  MYSQL_PASSWORD: "obscure"

  # Email Parameters
  # - the hostname/IP address of your mailserver
  MAIL_PORT_587_TCP_ADDR: "smtp.gmail.com"
  #the port for the mailserver (probably 587, could be another)
  MAIL_PORT_587_TCP_PORT: "587"
  # the default from address, and from name for emails
  MAIL_ENV_FROM_ADDR: "[email protected]"
  MAIL_ENV_FROM_NAME: "Snipe-IT"
  # - pick 'tls' for SMTP-over-SSL, 'tcp' for unencrypted
  MAIL_ENV_ENCRYPTION: "tls"
  # SMTP username and password
  MAIL_ENV_USERNAME: "obscure"
  MAIL_ENV_PASSWORD: "obscure"

  # Snipe-IT Settings
  APP_ENV: "production"
  APP_DEBUG: "false"
  APP_KEY: "obscure"
  APP_URL: "https://10.0.1.36"
  APP_TIMEZONE: "EST"
  APP_LOCALE: "en"
---
apiVersion: v1
kind: Service
metadata:
  name: snipeit
  labels:
    app: snipeit
spec:
  ports:
    - port: 443
  selector:
    app: snipeit
    tier: frontend
  type: LoadBalancer
  externalIPs:
  - 10.0.1.36
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: snipeit
  labels:
    app: snipeit
spec:
  selector:
    matchLabels:
      app: snipeit
      tier: frontend
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: snipeit
        tier: frontend
    spec:
      containers:
      - image: linuxserver/snipe-it:5.4.1
        name: snipeit
        envFrom:
            - configMapRef:
                name: snipe-it-config
        ports:
        - containerPort: 443
          name: snipeit
        volumeMounts:
        - name: snipeit-persistent-storage
          mountPath: /var/lib/snipeit
      volumes:
      - name: snipeit-persistent-storage
        persistentVolumeClaim:
          claimName: snipeit-pv-claim

I'm getting a 504 gateway timeout error when I try to run the deployment

any advice on how to fix this would be greatly appreciated



Solution 1:[1]

It is because ArrayAdapter does not support this. You need to create a custom adapter that will remember what has been checked so that when it redraws a view it does not take the default value of unchecked.

Create a class that extends from BaseAdapter that works on an ArrayList<Model> instead of string array. In this Model you can have a boolean checked (initially all false). That way when user scrolls around or searches your model will know weather current name is selected.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Taranmeet Singh