forked from tkestack/tke
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(installer): complete registry and application component
- Loading branch information
Showing
14 changed files
with
965 additions
and
72 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ var ( | |
"tke-registry-api", | ||
"tke-logagent-api", | ||
"tke-audit-api", | ||
"tke-application-api", | ||
} | ||
) | ||
|
||
|
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
46 changes: 46 additions & 0 deletions
46
cmd/tke-installer/app/installer/manifests/tke-application-api/manifest_test.go
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,46 @@ | ||
/* | ||
* Tencent is pleased to support the open source community by making TKEStack | ||
* available. | ||
* | ||
* Copyright (C) 2012-2020 Tencent. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the “License”); you may not use | ||
* this file except in compliance with the License. You may obtain a copy of the | ||
* License at | ||
* | ||
* https://opensource.org/licenses/Apache-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an “AS IS” BASIS, WITHOUT | ||
* WARRANTIES OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
|
||
package manifest | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
"tkestack.io/tke/pkg/kubectl" | ||
"tkestack.io/tke/pkg/util/template" | ||
) | ||
|
||
func TestManifest(t *testing.T) { | ||
data, err := template.ParseFile("tke-application-api.yaml", | ||
map[string]interface{}{ | ||
"Replicas": 1, | ||
"Image": "Image", | ||
"EnableAuth": true, | ||
"EnableAudit": true, | ||
"EnableRegistry": true, | ||
}) | ||
if !assert.Nil(t, err) { | ||
t.FailNow() | ||
} | ||
|
||
data, err = kubectl.Validate(data) | ||
if !assert.Nil(t, err) { | ||
t.Fatal(string(data)) | ||
} | ||
} |
Oops, something went wrong.