# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           golang 1.0

go.setup            github.com/derailed/popeye 0.22.1 v
revision            0

homepage            https://popeyecli.io

description         A Kubernetes Cluster Sanitizer

long_description    \
    Popeye is a utility that scans live Kubernetes clusters and reports \
    potential issues with deployed resources and configurations. It sanitizes \
    your cluster based on what’s deployed and not what’s sitting on disk. By \
    scanning your cluster, it detects misconfigurations and helps you to \
    ensure that best practices are in place, thus preventing future \
    headaches. It aims at reducing the cognitive overload one faces when \
    operating a Kubernetes cluster in the wild. Furthermore, if your cluster \
    employs a metric-server, it reports potential resources over/under \
    allocations and attempts to warn you should your cluster run out of \
    capacity.  Popeye is a readonly tool, it does not alter any of your \
    Kubernetes resources in any way!

categories          sysutils
installs_libs       no
license             Apache-2
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  971467581f55c6a19fd61a963b203e09d62c6872 \
                    sha256  f8eef3d6b9cda24f4d9bdc24620c1368cd6a749f1321a499e88b339258e01d92 \
                    size    2628880

# Allow Go to fetch deps at build time
go.offline_build no
go.toolchain_min    1.23.0

build.cmd           make
build.pre_args-append \
                    GIT="" DATE="" VERSION="${github.tag_prefix}${version}"
build.args          build

destroot {
    xinstall -m 0755 ${worksrcpath}/execs/${name} ${destroot}${prefix}/bin/
}
