IO-K8s

 view release on metacpan or  search on metacpan

t/24_combinations.t  view on Meta::CPAN

                metadata => {
                    labels      => { app => 'webapp', version => 'v2' },
                    annotations => { 'prometheus.io/scrape' => 'true' },
                },
                spec => {
                    serviceAccountName            => 'webapp-sa',
                    terminationGracePeriodSeconds  => 60,
                    initContainers => [
                        {
                            name    => 'init-db',
                            image   => 'busybox:1.36',
                            command => ['/bin/sh', '-c', 'until nslookup db; do sleep 2; done'],
                            resources => {
                                requests => { cpu => '50m', memory => '64Mi' },
                                limits   => { cpu => '100m', memory => '128Mi' },
                            },
                        },
                        {
                            name    => 'init-migrations',
                            image   => 'webapp:v2-migrate',
                            command => ['./migrate', '--up'],

t/25_real_world.t  view on Meta::CPAN

          matchLabels:
            app: web-app
      - maxSkew: 1
        topologyKey: kubernetes.io/hostname
        whenUnsatisfiable: ScheduleAnyway
        labelSelector:
          matchLabels:
            app: web-app
      initContainers:
      - name: wait-for-db
        image: busybox:1.36
        command: ['sh', '-c', 'until nc -z postgres-primary 5432; do sleep 2; done']
        resources:
          requests:
            cpu: 10m
            memory: 16Mi
      containers:
      - name: web
        image: myapp/web:v3.2.1
        ports:
        - containerPort: 8080

t/26_build_verify.t  view on Meta::CPAN

            namespace => 'production',
        },
        spec => {
            replicas => 3,
            selector => { matchLabels => { app => 'web' } },
            template => {
                metadata => { labels => { app => 'web' } },
                spec => {
                    initContainers => [{
                        name    => 'wait-for-db',
                        image   => 'busybox:1.36',
                        command => ['sh', '-c', 'until nc -z db 5432; do sleep 1; done'],
                    }],
                    containers => [{
                        name  => 'web',
                        image => 'web-app:v3',
                        ports => [{ containerPort => 8080, name => 'http' }],
                        resources => {
                            requests => { cpu => '100m', memory => '128Mi' },
                            limits   => { cpu => '500m', memory => '512Mi' },
                        },



( run in 0.963 second using v1.01-cache-2.11-cpan-39bf76dae61 )