-
Notifications
You must be signed in to change notification settings - Fork 579
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
k8s: Add kminion to e2e tests for artificial load
Kminion will create artificial load to have any values for `vectorized_cluster_partition_under_replicated_replicas` metric.
- Loading branch information
Rafal Korepta
committed
Jan 4, 2023
1 parent
f0ba164
commit 4515dc8
Showing
36 changed files
with
1,243 additions
and
364 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
101 changes: 12 additions & 89 deletions
101
src/go/k8s/tests/e2e/update-image-and-node-port/01-assert.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,22 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
kind: Deployment | ||
metadata: | ||
name: update-image-cluster-and-node-port | ||
name: kminion | ||
status: | ||
readyReplicas: 2 | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: update-image-cluster-and-node-port-0 | ||
spec: | ||
containers: | ||
- name: redpanda | ||
image: "vectorized/redpanda:v22.2.8" | ||
volumeMounts: | ||
- mountPath: /etc/redpanda | ||
name: config-dir | ||
- mountPath: /scripts | ||
name: hook-scripts-dir | ||
- mountPath: /etc/redpanda/.bootstrap.yaml | ||
name: configmap-dir | ||
subPath: .bootstrap.yaml | ||
- mountPath: /var/lib/redpanda/data | ||
name: datadir | ||
- mountPath: /var/lib/shadow-index-cache | ||
name: shadow-index-cache | ||
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount | ||
readOnly: true | ||
status: | ||
phase: "Running" | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: update-image-cluster-and-node-port-1 | ||
spec: | ||
containers: | ||
- name: redpanda | ||
image: "vectorized/redpanda:v22.2.8" | ||
volumeMounts: | ||
- mountPath: /etc/redpanda | ||
name: config-dir | ||
- mountPath: /scripts | ||
name: hook-scripts-dir | ||
- mountPath: /etc/redpanda/.bootstrap.yaml | ||
name: configmap-dir | ||
subPath: .bootstrap.yaml | ||
- mountPath: /var/lib/redpanda/data | ||
name: datadir | ||
- mountPath: /var/lib/shadow-index-cache | ||
name: shadow-index-cache | ||
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount | ||
readOnly: true | ||
status: | ||
phase: "Running" | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: update-image-cluster-and-node-port-external | ||
spec: | ||
externalTrafficPolicy: Local | ||
ports: | ||
- name: kafka-external | ||
nodePort: 32748 | ||
port: 9093 | ||
protocol: TCP | ||
targetPort: 9093 | ||
- name: admin-external | ||
nodePort: 31178 | ||
port: 9645 | ||
protocol: TCP | ||
targetPort: 9645 | ||
type: NodePort | ||
availableReplicas: 1 | ||
readyReplicas: 1 | ||
replicas: 1 | ||
updatedReplicas: 1 | ||
|
||
--- | ||
|
||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
collectors: | ||
- type: command | ||
command: kubectl get pod -o json -n $NAMESPACE | ||
- type: command | ||
command: kubectl describe pod -n $NAMESPACE | ||
- type: pod | ||
selector: app.kubernetes.io/name=redpanda | ||
tail: -1 | ||
|
||
--- | ||
|
||
apiVersion: redpanda.vectorized.io/v1alpha1 | ||
kind: Cluster | ||
metadata: | ||
name: update-image-cluster-and-node-port | ||
status: | ||
version: "v22.2.8" | ||
selector: app.kubernetes.io/name=kminion | ||
tail: -1 |
126 changes: 126 additions & 0 deletions
126
src/go/k8s/tests/e2e/update-image-and-node-port/01-create-kminion.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: kminion | ||
spec: | ||
progressDeadlineSeconds: 600 | ||
replicas: 1 | ||
revisionHistoryLimit: 10 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/instance: kminion | ||
app.kubernetes.io/name: kminion | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: kminion | ||
app.kubernetes.io/name: kminion | ||
spec: | ||
containers: | ||
- env: | ||
- name: CONFIG_FILEPATH | ||
value: /etc/kminion/config.yaml | ||
image: quay.io/cloudhut/kminion:v2.2.0 | ||
imagePullPolicy: IfNotPresent | ||
name: kminion | ||
ports: | ||
- containerPort: 8080 | ||
name: metrics | ||
protocol: TCP | ||
readinessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: /ready | ||
port: 8080 | ||
scheme: HTTP | ||
initialDelaySeconds: 10 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 1 | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 256Mi | ||
requests: | ||
cpu: 100m | ||
memory: 128Mi | ||
securityContext: {} | ||
terminationMessagePath: /dev/termination-log | ||
terminationMessagePolicy: File | ||
volumeMounts: | ||
- mountPath: /etc/kminion | ||
name: config | ||
dnsPolicy: ClusterFirst | ||
restartPolicy: Always | ||
schedulerName: default-scheduler | ||
securityContext: | ||
fsGroup: 99 | ||
runAsUser: 99 | ||
terminationGracePeriodSeconds: 30 | ||
volumes: | ||
- configMap: | ||
defaultMode: 420 | ||
name: kminion | ||
name: config | ||
--- | ||
apiVersion: v1 | ||
data: | ||
config.yaml: | | ||
exporter: | ||
host: "" | ||
namespace: test_sla | ||
port: 8080 | ||
kafka: | ||
brokers: | ||
- update-image-cluster-and-node-port-0.update-image-cluster-and-node-port:9092 | ||
- update-image-cluster-and-node-port-1.update-image-cluster-and-node-port:9092 | ||
- update-image-cluster-and-node-port-2.update-image-cluster-and-node-port:9092 | ||
clientId: kminion | ||
rackId: "" | ||
sasl: | ||
enabled: false | ||
tls: | ||
caFilepath: "" | ||
certFilepath: "" | ||
enabled: false | ||
insecureSkipTlsVerify: false | ||
keyFilepath: "" | ||
passphrase: "" | ||
logger: | ||
level: info | ||
minion: | ||
consumerGroups: | ||
allowedGroups: [] | ||
enabled: false | ||
granularity: partition | ||
ignoredGroups: [] | ||
scrapeMode: adminApi | ||
endToEnd: | ||
consumer: | ||
commitSla: 2s | ||
deleteStaleConsumerGroups: false | ||
groupIdPrefix: test | ||
roundtripSla: 2s | ||
enabled: true | ||
probeInterval: 3ns | ||
producer: | ||
ackSla: 1s | ||
requiredAcks: all | ||
topicManagement: | ||
enabled: true | ||
name: test_e2e_probe | ||
partitionsPerBroker: 5 | ||
reconciliationInterval: 1m | ||
replicationFactor: 3 | ||
logDirs: | ||
enabled: false | ||
topics: | ||
allowedTopics: [] | ||
granularity: partition | ||
ignoredTopics: [] | ||
infoMetric: | ||
configKeys: | ||
- cleanup.policy | ||
kind: ConfigMap | ||
metadata: | ||
name: kminion |
Oops, something went wrong.