Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Get secret suffix #952

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.spotify.styx;

import static java.nio.charset.StandardCharsets.UTF_8;

import com.google.common.hash.Hashing;

public class GetGKESecret {
private GetGKESecret() {}

public static void main(String[] args) {
var serviceAccount = "service-account";
var suffix = Hashing.sha256().hashString(serviceAccount, UTF_8);
System.out.println(suffix);
// Then do:
// kubectl get secrets | grep <suffix>
}
}