-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ipoperator): incorporate fixes from akash repo
refs ovrclk/engineering#379 Signed-off-by: Artur Troian <[email protected]>
- Loading branch information
1 parent
442eb54
commit 8c5bb3e
Showing
18 changed files
with
207 additions
and
39 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
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- deployment.yaml | ||
- service.yaml | ||
|
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ apiVersion: v1 | |
kind: ServiceAccount | ||
metadata: | ||
name: akash-ip-operator | ||
namespace: akash-services |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,33 @@ | ||
package util_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/ovrclk/akash/testutil" | ||
"github.com/stretchr/testify/require" | ||
|
||
"github.com/ovrclk/provider-services/cluster/util" | ||
) | ||
|
||
func TestPassesThroughNames(t *testing.T) { | ||
leaseID := testutil.LeaseID(t) | ||
|
||
sharingKey := util.MakeIPSharingKey(leaseID, "foobar") | ||
require.Contains(t, sharingKey, "foobar") | ||
} | ||
|
||
func TestFiltersUnderscore(t *testing.T) { | ||
leaseID := testutil.LeaseID(t) | ||
|
||
sharingKey := util.MakeIPSharingKey(leaseID, "me_you") | ||
require.NotContains(t, sharingKey, "me_you") | ||
} | ||
|
||
func TestFiltersUppercase(t *testing.T) { | ||
leaseID := testutil.LeaseID(t) | ||
|
||
sharingKey := util.MakeIPSharingKey(leaseID, "meYOU") | ||
require.NotContains(t, sharingKey, "meYOU") | ||
|
||
require.Equal(t, sharingKey, leaseID.GetOwner()+"-ip-ps9pn7rkocct7m9ivtovuktb") | ||
} |
Oops, something went wrong.