krisnova / naml

Convert Kubernetes YAML to Golang
Apache License 2.0
1.26k stars 38 forks source link

Compile Issue #101

Closed krisnova closed 2 years ago

krisnova commented 2 years ago
Saul Nachman12:17 PM
# command-line-arguments
./test.go:31:2: imported and not used: "k8s.io/api/apps/v1" as appsv1
./test.go:32:2: imported and not used: "k8s.io/api/core/v1" as corev1
./test.go:33:2: imported and not used: "k8s.io/api/networking/v1" as networkingv1
./test.go:35:2: imported and not used: "k8s.io/apimachinery/pkg/util/intstr"
./test.go:73:25: undefined: Ingress
./test.go:108:33: client.NetworkingV1().Ingresss undefined (type "k8s.io/client-go/kubernetes/typed/networking/v1".NetworkingV1Interface has
krisnova commented 2 years ago
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: nginx-thing
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$2
  labels:
    app: nginx-thing
spec:
  ingressClassName: nginx
  rules:
  - http:
      paths:
      - pathType: Prefix
        path: /nginx-thing(/|$)(.*)
        backend:
          service:
            name: nginx-thing
            port: 
              number: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-thing
  annotations:
krisnova commented 2 years ago

https://github.com/kris-nova/naml/blob/main/codify/ingress.go#L61

krisnova commented 2 years ago

ConfigMapEnvSource -> corev1