Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove dependency on k8s-addons (#141)
- Loading branch information
Showing
55 changed files
with
323 additions
and
1,124 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
metadata: | ||
name: certificate.appscode.com | ||
apiVersion: extensions/v1beta1 | ||
kind: ThirdPartyResource | ||
description: "A specification of a Let's Encrypt Certificate to manage." | ||
versions: | ||
- name: v1beta1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
metadata: | ||
name: ingress.appscode.com | ||
apiVersion: extensions/v1beta1 | ||
kind: ThirdPartyResource | ||
description: "Extended ingress support for Kubernetes by appscode.com" | ||
versions: | ||
- name: v1beta1 |
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
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
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
File renamed without changes.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package clientset | ||
|
||
import ( | ||
"fmt" | ||
"reflect" | ||
"testing" | ||
|
||
aci "github.com/appscode/voyager/api" | ||
"github.com/stretchr/testify/assert" | ||
"k8s.io/kubernetes/pkg/api" | ||
"k8s.io/kubernetes/pkg/api/unversioned" | ||
"k8s.io/kubernetes/pkg/apimachinery/registered" | ||
"k8s.io/kubernetes/pkg/runtime" | ||
) | ||
|
||
func TestDefaultGroupVersion(t *testing.T) { | ||
i := &aci.Ingress{ | ||
ObjectMeta: api.ObjectMeta{ | ||
Name: "foo", | ||
Namespace: "bar", | ||
}, | ||
} | ||
|
||
gv, err := unversioned.ParseGroupVersion("appscode.com/v1beta1") | ||
if err != nil { | ||
fmt.Println(err) | ||
} | ||
// if appscode.com/v1beta1 is not enabled, return an error | ||
if !registered.IsEnabledVersion(gv) { | ||
fmt.Println("appscode.com/v1beta1 is not enabled") | ||
} | ||
|
||
fmt.Println(*i) | ||
} | ||
|
||
func TestSetDefault(t *testing.T) { | ||
metadata := &unversioned.TypeMeta{ | ||
Kind: "Ingress", | ||
APIVersion: "appscode.com/v1beta1", | ||
} | ||
var obj runtime.Object | ||
|
||
obj, err := setDefaultType(metadata) | ||
fmt.Println(obj, err) | ||
assert.NotNil(t, obj) | ||
fmt.Println(reflect.ValueOf(obj).Type().String()) | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## fakes | ||
|
||
This package is a fake kube resource implementation. Should Only be used for Testing purpose. |
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
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
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
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
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
Oops, something went wrong.