Skip to content

Commit

Permalink
Deprecate aws-auth ConfigMap (#1342)
Browse files Browse the repository at this point in the history
Following up on AWS' deprecation of the aws-auth ConfigMap.
We're deprecating the enums for the `CONFIG_MAP` and
`API_AND_CONFIG_MAP`
AuthenticationModes.
This will steer users into the right direction of using the `API`
AuthenticationMode.

Details around the deprecation are here:
https://docs.aws.amazon.com/eks/latest/userguide/auth-configmap.html
This is a good guide for how to migrate away from it:
https://docs.aws.amazon.com/eks/latest/userguide/migrating-access-entries.html

We have a Pulumi migration guide for this in
docs/authentication-mode-migration.md. As a follow up we want
to publish this to the Pulumi Docs as a How-To.

Closes #1213
  • Loading branch information
flostadler authored Sep 13, 2024
1 parent a5c6e7a commit a791c9f
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 2 deletions.
6 changes: 6 additions & 0 deletions nodejs/eks/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1663,10 +1663,16 @@ export const AuthenticationMode = {
API: "API",
/**
* Only aws-auth ConfigMap will be used for authenticating to the Kubernetes API.
*
* @deprecated The aws-auth ConfigMap is deprecated. The recommended method to manage access to Kubernetes APIs is Access Entries with the AuthenticationMode API.
* For more information and instructions how to upgrade, see https://docs.aws.amazon.com/eks/latest/userguide/migrating-access-entries.html.
*/
CONFIG_MAP: "CONFIG_MAP",
/**
* Both aws-auth ConfigMap and Access Entries can be used for authenticating to the Kubernetes API.
*
* @deprecated The aws-auth ConfigMap is deprecated. The recommended method to manage access to Kubernetes APIs is Access Entries with the AuthenticationMode API.
* For more information and instructions how to upgrade, see https://docs.aws.amazon.com/eks/latest/userguide/migrating-access-entries.html.
*/
API_AND_CONFIG_MAP: "API_AND_CONFIG_MAP",
} as const;
Expand Down
4 changes: 4 additions & 0 deletions provider/cmd/pulumi-gen-eks/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1624,6 +1624,8 @@ func generateSchema() schema.PackageSpec {
Name: "ConfigMap",
Value: "CONFIG_MAP",
Description: "Only aws-auth ConfigMap will be used for authenticating to the Kubernetes API.",
DeprecationMessage: "The aws-auth ConfigMap is deprecated. The recommended method to manage access to Kubernetes APIs is Access Entries with the AuthenticationMode API.\n" +
"For more information and instructions how to upgrade, see https://docs.aws.amazon.com/eks/latest/userguide/migrating-access-entries.html.",
},
{
Name: "Api",
Expand All @@ -1634,6 +1636,8 @@ func generateSchema() schema.PackageSpec {
Name: "ApiAndConfigMap",
Value: "API_AND_CONFIG_MAP",
Description: "Both aws-auth ConfigMap and Access Entries can be used for authenticating to the Kubernetes API.",
DeprecationMessage: "The aws-auth ConfigMap is deprecated. The recommended method to manage access to Kubernetes APIs is Access Entries with the AuthenticationMode API.\n" +
"For more information and instructions how to upgrade, see https://docs.aws.amazon.com/eks/latest/userguide/migrating-access-entries.html.",
},
},
},
Expand Down
6 changes: 4 additions & 2 deletions provider/cmd/pulumi-resource-eks/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@
{
"name": "ConfigMap",
"description": "Only aws-auth ConfigMap will be used for authenticating to the Kubernetes API.",
"value": "CONFIG_MAP"
"value": "CONFIG_MAP",
"deprecationMessage": "The aws-auth ConfigMap is deprecated. The recommended method to manage access to Kubernetes APIs is Access Entries with the AuthenticationMode API.\nFor more information and instructions how to upgrade, see https://docs.aws.amazon.com/eks/latest/userguide/migrating-access-entries.html."
},
{
"name": "Api",
Expand All @@ -153,7 +154,8 @@
{
"name": "ApiAndConfigMap",
"description": "Both aws-auth ConfigMap and Access Entries can be used for authenticating to the Kubernetes API.",
"value": "API_AND_CONFIG_MAP"
"value": "API_AND_CONFIG_MAP",
"deprecationMessage": "The aws-auth ConfigMap is deprecated. The recommended method to manage access to Kubernetes APIs is Access Entries with the AuthenticationMode API.\nFor more information and instructions how to upgrade, see https://docs.aws.amazon.com/eks/latest/userguide/migrating-access-entries.html."
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions sdk/dotnet/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ private AuthenticationMode(string value)
/// <summary>
/// Only aws-auth ConfigMap will be used for authenticating to the Kubernetes API.
/// </summary>
[Obsolete(@"The aws-auth ConfigMap is deprecated. The recommended method to manage access to Kubernetes APIs is Access Entries with the AuthenticationMode API.
For more information and instructions how to upgrade, see https://docs.aws.amazon.com/eks/latest/userguide/migrating-access-entries.html.")]
public static AuthenticationMode ConfigMap { get; } = new AuthenticationMode("CONFIG_MAP");
/// <summary>
/// Only Access Entries will be used for authenticating to the Kubernetes API.
Expand All @@ -80,6 +82,8 @@ private AuthenticationMode(string value)
/// <summary>
/// Both aws-auth ConfigMap and Access Entries can be used for authenticating to the Kubernetes API.
/// </summary>
[Obsolete(@"The aws-auth ConfigMap is deprecated. The recommended method to manage access to Kubernetes APIs is Access Entries with the AuthenticationMode API.
For more information and instructions how to upgrade, see https://docs.aws.amazon.com/eks/latest/userguide/migrating-access-entries.html.")]
public static AuthenticationMode ApiAndConfigMap { get; } = new AuthenticationMode("API_AND_CONFIG_MAP");

public static bool operator ==(AuthenticationMode left, AuthenticationMode right) => left.Equals(right);
Expand Down
6 changes: 6 additions & 0 deletions sdk/go/eks/pulumiEnums.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ public enum AuthenticationMode {
/**
* Only aws-auth ConfigMap will be used for authenticating to the Kubernetes API.
*
* @deprecated
* The aws-auth ConfigMap is deprecated. The recommended method to manage access to Kubernetes APIs is Access Entries with the AuthenticationMode API.
For more information and instructions how to upgrade, see https://docs.aws.amazon.com/eks/latest/userguide/migrating-access-entries.html.
*/
@Deprecated /* The aws-auth ConfigMap is deprecated. The recommended method to manage access to Kubernetes APIs is Access Entries with the AuthenticationMode API.
For more information and instructions how to upgrade, see https://docs.aws.amazon.com/eks/latest/userguide/migrating-access-entries.html. */
ConfigMap("CONFIG_MAP"),
/**
* Only Access Entries will be used for authenticating to the Kubernetes API.
Expand All @@ -30,7 +35,12 @@ public enum AuthenticationMode {
/**
* Both aws-auth ConfigMap and Access Entries can be used for authenticating to the Kubernetes API.
*
* @deprecated
* The aws-auth ConfigMap is deprecated. The recommended method to manage access to Kubernetes APIs is Access Entries with the AuthenticationMode API.
For more information and instructions how to upgrade, see https://docs.aws.amazon.com/eks/latest/userguide/migrating-access-entries.html.
*/
@Deprecated /* The aws-auth ConfigMap is deprecated. The recommended method to manage access to Kubernetes APIs is Access Entries with the AuthenticationMode API.
For more information and instructions how to upgrade, see https://docs.aws.amazon.com/eks/latest/userguide/migrating-access-entries.html. */
ApiAndConfigMap("API_AND_CONFIG_MAP");

private final String value;
Expand Down

0 comments on commit a791c9f

Please sign in to comment.