This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"time" | |
"k8s.io/klog" | |
"k8s.io/api/core/v1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
CURRENT_DIR=$(pwd) | |
GEN_DIR=$(dirname $0) | |
REPO_DIR="$CURRENT_DIR/$GEN_DIR/../.." | |
PROJECT_MODULE="github.com/superman/demo" | |
IMAGE_NAME="kubernetes-codegen:latest" | |
CUSTOM_RESOURCE_NAME="foo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.11.2 | |
ENV GO111MODULE=off | |
RUN go get k8s.io/code-generator; exit 0 | |
RUN go get k8s.io/apimachinery; exit 0 | |
ARG repo="${GOPATH}/src/github.com/superman/demo" | |
RUN mkdir -p $repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package v1 | |
import ( | |
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
"k8s.io/apimachinery/pkg/runtime" | |
"k8s.io/apimachinery/pkg/runtime/schema" | |
) | |
// Define your schema name and the version | |
var SchemeGroupVersion = schema.GroupVersion{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"github.com/golang/glog" | |
"k8s.io/apimachinery/pkg/util/wait" | |
"k8s.io/client-go/kubernetes" | |
"k8s.io/client-go/rest" |