Skip to content

v1.0.0-beta.12

Compare
Choose a tag to compare
@maslow maslow released this 31 Oct 07:07
· 246 commits to main since this release

What's Changed

New Contributors

Full Changelog: v1.0.0-beta.11...v1.0.0-beta.12

Migration Guides

Update laf-server & laf-web images:

# upgrade laf SERVER
kubectl set image deployments/laf-server -n laf-system \
	laf-server=docker.io/lafyun/laf-server:1.0.0-beta.12

# upgrade laf WEB
kubectl set image deployments/laf-web -n laf-system \
	laf-web=docker.io/lafyun/laf-web:1.0.0-beta.12

Update sys_db to upgrade runtime images

// runtime version
const version = "1.0.0-beta.12"
// const version = "1.0.0-beta.12"

const main_image = `docker.io/lafyun/runtime-node:${version}`
const init_image = `docker.io/lafyun/runtime-node:${version}`

db.Runtime.updateOne({ latest: true }, {
  $set: {
		version: version,
    image: {
      main: main_image,
      init: init_image
    }
	}
})

db.Runtime.find().pretty()

Update sys_db.Region if you still use apisix gateway:

Deprecated: apisix gateway is deprecated in laf, will not be supported in future.

use sys_db
db.Region.updateOne({}, {
    $set: {
        namespaceConf: {
            mode: 'appid',
            prefix: '',
            fixed: ''
        },
        'gatewayConf.tls.wildcardCertificateSecretName': null,
        'gatewayConf.driver': 'apisix'
    }
})

Migrate apisix gateway to nginx ingress gateway:

First stop all laf applications by update sys_db:

use sys_db;
db.Application.updateMany({ state: 'Running' }, {
    $set: {
        state: 'Stopped',
        _restart_flag: 'migration-gateway'
    }
})

Waiting for all application stopped.

# stop laf-server
kubectl scale deployment laf-server -n laf-system --replicas=0

# uninstall apisix
helm delete apisix --namespace laf-system

sealos run docker.io/labring/ingress-nginx:v1.8.1 \
      -e HELM_OPTS="-n ingress-nginx --set controller.hostNetwork=true --set controller.kind=DaemonSet --set controller.service.enabled=false"

kubectl create namespace laf-runtime
use sys_db
db.Region.updateOne({}, {
    $set: {
        namespaceConf: {
            mode: 'fixed',
            prefix: '',
            fixed: 'laf-runtime'
        },
        'gatewayConf.tls.wildcardCertificateSecretName': '',
        'gatewayConf.driver': 'nginx'
    }
})
# start laf-server
kubectl scale deployment laf-server -n laf-system --replicas=1

Start all applications:

db.Application.updateMany({ state: 'Stopped', _restart_flag: 'migration-gateway' }, {
        $set: { state: 'Running' }
    })